I\'d like to filter out weekend data and only look at data for weekdays (mon(0)-fri(4)). I\'m new to pandas, what\'s the best way to accomplish this in pandas?
Faster way would be to use DatetimeIndex.weekday, like so:
temp = pd.DatetimeIndex(data['my_dt']) data['weekday'] = temp.weekday
Much much faster, especially for a large number of rows. For further info, check this answer.