Get weekday/day-of-week for Datetime column of DataFrame
Use the new dt.dayofweek property: In [2]: df[‘weekday’] = df[‘Timestamp’].dt.dayofweek df Out[2]: Timestamp Value weekday 0 2012-06-01 00:00:00 100 4 1 2012-06-01 00:15:00 150 4 2 2012-06-01 00:30:00 120 4 3 2012-06-01 01:00:00 220 4 4 2012-06-01 01:15:00 80 4 In the situation where the Timestamp is your index you need to reset the index … Read more