0

I have a dataframe with the following column (where is more than one column there):

camp_data['visit_time']    

39697    2017-12-25 16:19:51
39701    2017-12-25 16:19:48
39708    2017-12-25 16:19:19
39711    2017-12-25 16:19:18
39715    2017-12-25 16:19:32
39717    2017-12-25 16:19:57
39718    2017-12-25 16:19:19

I'm trying to sort these values like this:

camp_data.sort_values(by=['visit_time'])

But they are still unsorted:

39697    2017-12-25 16:19:51
39701    2017-12-25 16:19:48
39708    2017-12-25 16:19:19
39711    2017-12-25 16:19:18
39715    2017-12-25 16:19:32
39717    2017-12-25 16:19:57
39718    2017-12-25 16:19:19

What is the proper way to sort these values? They seem to be sorted normally only by date not by time

2
  • camp_data. = camp_data.sort_values(by=['visit_time']) or camp_data.sort_values(by=['visit_time'], inplace=True) ? Commented Mar 28, 2018 at 11:52
  • 1
    show full description of this camp_data variable. is it list of strings? list of dictionaries or what? Commented Mar 28, 2018 at 11:58

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.