cumulative average pandas code example Example: pandas cumulative mean df['value'].expanding().mean()