I have a Pandas dataframe looking like this:
Class | Name |
---|---|
2.2 | Propellers |
4.1 | Solenoids |
4.10 | Barrels |
4.7 | Collagen |
4.9 | Beads |
5.5 | Prisms |
and I need to sort it in this format instead:
Class | Name |
---|---|
2.2 | Propellers |
4.1 | Solenoids |
4.7 | Collagen |
4.9 | Beads |
4.10 | Barrels |
5.5 | Prisms |
I can do this in python but I was wondering if there is a way that I can do this easily in Pandas. I tried the regular sort but it considers the numbers as floats and therefore doesn't give the desired result.