human
in pandas how can I groupby weekday() for a datetime column?
assistant
Here is some code to create a new column `weekday` in pandas data frame `data` based on the values in column `my_dt`

data['weekday'] = data['my_dt'].apply(lambda x: x.weekday())

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.