i have a categorical column in a dataframe with the days of the week
name day_of_week
example 1 Monday
example 2 Monday
example 3 Wednesday
example 4 Monday
example 5 Friday
example 6 Monday
example 7 Sunday
but i need to change it to datetime format with the corresponding values and can't seem to do it
name day_of_week
example 1 0
example 2 0
example 3 2
example 4 0
example 5 4
example 6 0
example 7 6
is there a simple one line way to do it?
dataframe['day_of_week'] = dataframe['day_of_week'].??