I have a column of dates but not all of the rows are DateTime type, some rows have string datatype, such as Jan'11, Jan 11, Jan-11. My idea is I wanna replace the split "'", and " " to be "-", then replace it to datetime format.
so this is the code that I tried,
replacers = {"'":"-"," ":"-"}
df['Periode1'] = df['Periode1'].replace(replacers)
but when I check df[df['Periode1']=="Jan'11"]
it still not change to be "Jan-11". So how to solve it?