i have a column called edition and the column values are'Paperback,– 10 Mar 2016' and i want to fetch only month and year from it
I have already tried
train_df['Edition_Year'] = train_df['Edition'].str.split(' ').str[3]
but all the values are not in the same length so i am not getting properly
Values in the columns are
Paperback,– 10 Mar 2016
Hardcover,– Import, 1 Mar 2018
like this
train_df['Edition_Year'] = train_df['Edition'].str.split(' ').str[3]
I want to get two columns one for month and another for Year