<human>:  in pandas how can I groupby weekday() for a datetime column?
<bot>:.apply(lambda x: x.weekday())

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