I currently have the following output:
df.Date
0 2020/2/29 12:40:0
1 2020/2/29 12:50:0
2 2020/2/29 13:0:0
3 2020/2/29 13:10:0
4 2020/2/29 13:20:0
...
21525 2020/7/28 10:10:0
21526 2020/7/28 10:20:0
21527 2020/7/28 10:30:0
21528 2020/7/28 10:40:0
21529 2020/7/28 10:50:0
Name: Date, Length: 21530, dtype: object
And I would like to eliminate the year, hours, mins and secs, leaving just the month and day:
0 2/29
1 2/29
2 2/29
3 2/29
4 2/29
...
21525 7/28
21526 7/28
I tried to use the replace
function, but it messed up my data somehow:
df.Date = df.Date.str.replace('2020/' , '')
df.Date = df.Date.str.replace('..:..:.' , '')
Is there other way to do this?