I have a dataframe containing a column having values like feb-20.
How to convert it to datetime
I have a dataframe containing a column having values like feb-20.
How to convert it to datetime
This will treat the day as 1:
pd.to_datetime(df["col_name"], format="%b-%y")
Because you use 2-digit year, there are some oddities around the conversion: anything up to 68 means 20.. while 69+ means 19...