算数运算
加减乘除,略。
比较运算
略。
汇总运算
import pandas as pddf = pd.read_excel(r"test_08.xlsx", sheet_name = 0, header = 0)df# 非空值计数df.count()# 求和df.sum()# 求平均值df.mean()# 求最大值df.max()# 求最小值df.min()# 求中位数df.median()# 求众数df.mode()# 求方差df.var()# 求标准差df.std()# 求分位数df.quantile()# describedf.describe()
| min | max | |
|---|---|---|
| count | 5.000000 | 5.000000 |
| mean | 4.400000 | 4.200000 |
| std | 0.894427 | 1.095445 |
| min | 3.000000 | 3.000000 |
| 25% | 4.000000 | 3.000000 |
| 50% | 5.000000 | 5.000000 |
| 75% | 5.000000 | 5.000000 |
| max | 5.000000 | 5.000000 |
相关性运算
相关性:即两个事物之间的相关程度。
函数:corr()
df['min'].corr(df['max'])
-0.6123724356957947
