column mean pandas dataframe code example
Example 1: return mean of df as dataframe
df.mean().to_frame().T
Example 2: calculating mean for pandas column
df["columnName"].mean()
df.mean().to_frame().T
df["columnName"].mean()