Set-up
I have a dataframe with amongst others a column with dates in string.
The date format is day/month/year, e.g. 05/12/2018.
The test_df
dataframe looks like,
date_created
0 05/12/2018
1 04/12/2018
2 04/12/2018
3 03/12/2018
4 02/12/2018
5 30/11/2018
6 30/11/2018
7 30/11/2018
8 30/11/2018
9 29/11/2018
10 02/12/2018
11 29/11/2018
12 29/11/2018
Problem
I want this to be sorted on date, such that I have,
date_created
0 05/12/2018
1 04/12/2018
2 04/12/2018
3 03/12/2018
10 02/12/2018
4 02/12/2018
5 30/11/2018
6 30/11/2018
7 30/11/2018
8 30/11/2018
9 29/11/2018
11 29/11/2018
12 29/11/2018
but following this example,
test_df.sort_values(by='date_created', inplace=False, ascending=True)
gives,
date_created
4 02/12/2018
10 02/12/2018
3 03/12/2018
1 04/12/2018
2 04/12/2018
0 05/12/2018
9 29/11/2018
11 29/11/2018
12 29/11/2018
5 30/11/2018
6 30/11/2018
7 30/11/2018
8 30/11/2018
How do I reverse the order within the month?