I need some help in order to represent my data frame in another way with pandas in python
Here is the data frame:
Order Nsp1 Nsp2 Tips Select
Carnivora 10 10 SpA,SpB,SpC 0.7678
Carnivora 1 1 SpD NA
Carnivora 2 2 SpE,SpF 0.467103
Carnivora 4 4 SpG 0.303415
As you can se the column Tips
can have several Spnames
and I would like to get a new data frame such as :
Species Order Nsp1 Nsp2 Select
SpA Carnivora 10 10 0.7678
SpB Carnivora 10 10 0.7678
SpC Carnivora 10 10 0.7678
SpD Carnivora 1 1 NA
SpE Carnivora 2 2 0.467103
SpF Carnivora 2 2 0.467103
SpG Carnivora 4 4 0.303415
Where The Tips column
disappears by instead I create a new column Species
with them.
Does anyone have an idea ?
Thank you for your help and time.