New to Pandas, maybe I am missing a big idea? I have a Pandas DataFrame transaction register with a form like (500,4) :
Time datetime64[ns] Net Total float64 Tax float64 Total Due float64
I am working on my code in a Python3 Jupyter laptop . I can not go through sorting any column. Working with various code examples for sorting, I don't see the output order when I check df. So, I reduced the problem by trying to order only one column:
df.sort_values(by='Time')
No matter what column name or boolean argument I use, the displayed results never change order.
Thinking it might be Jupyter, I looked at the results with print(df) , df.head() and HTML(df.to_html()) (last example for Jupyter laptops). I also restarted the entire notepad from importing CSV to this code. And I'm also new to Python3 (from version 2.7), so sometimes I get stuck, but I don’t see how relevant this is in this case.
Another publication has a similar problem, Python Pandas sort_values dataframe does not work . In this case, the ordering was performed by the type of the string column. But, as you can see, all the columns here are uniquely sorted.
Why doesn't my Pandas DataFrame display the new order with sort_values ?
xtian source share