sort_values() date code example
Example 1: python order dataframe according to date time
df = df.sort_values(by='DateTime1',ascending=True)
Example 2: sort by dataframe
DataFrame.sort_values(self, by, axis=0, ascending=True,
inplace=False, kind='quicksort',
na_position='last',
ignore_index=False)
# Example
df.sort_values(by=['ColToSortBy'])