I have a data frame that looks like the image below:
the data frame is called df_original
.
How do I split it so that I end up with a df_weekend
which contains all the data that occurs on Saturday and Sundar, and df_weekday
which contains all the data from Monday to Friday?
I originally tried using the solution found at Pandas - Split dataframe into multiple dataframes based on dates?
But I ran into a ValueError