I would like to calculate the mean and standard deviation of a timedelta by bank from a dataframe with two columns shown
mean
standard deviation
timedelta
dataframe
Pandas mean() and other aggregation methods support numeric_only=False parameter.
mean()
numeric_only=False
dropped.groupby('bank').mean(numeric_only=False)
Found here: Aggregations for Timedelta values in the Python DataFrame