I am quite new to pandas (working with 3rd party code, forced to use it!), and I have a dataframe which looks like so:
name_id cookie_id file_name_id
John 56 /some/loc
Doe 45 /some/loc2
John 67 /some/loc3
hilary 768 /some/loc4
wendy 8 /some/loc3
hilary 4 /some/loc4
I would like to sort them by the name_id
like so:
name_id cookie_id file_name_id
Doe 45 /some/loc2
John 56 /some/loc
John 67 /some/loc3
hilary 768 /some/loc4
hilary 4 /some/loc4
wendy 8 /some/loc3
I am looking at:
df.sort_values(by=['name_id'])
and it does seem to give me the correct answer, but since I am new to pandas, I am afraid there might be some gotchas I need to aware of.