I want to find out the following: given a date (datetime object), what is the corresponding day of the week?
datetime
For instance, Sunday is the first day, Mond
If you have dates as a string, it might be easier to do it using pandas' Timestamp
import pandas as pd df = pd.Timestamp("2019-04-12") print(df.dayofweek, df.weekday_name)
Output:
4 Friday