The average processing of columns is
average = df.mean()
However, if you list this, the index will be removed and you can list only the numerical values.
df_average = list(df.mean())
print(df.mean())
print(df_average)
"""
Popular 8.326087
Arrival 8.022222
Time 84.191111
Dressing difference 1.653333
Horse weight 442.130435
dtype: float64
"""
"""
[8.326086956521738, 8.022222222222222, 84.19111111111113, 1.653333333333333, 442.1304347826087]
"""
Recommended Posts