[python] pandas study notes (four) data statistics function

1. Extract the statistical results of all numeric columns
df.describe()

2. Look at the mean value of a single Series, the maximum and minimum
df['Series'].mean()
df['Series'].max()
df['Series'].min()

3. The only deduplication
df['Series'].unique()

4. Count by value
df['Series'].value_counts()

5. Correlation coefficient and covariance

rating.corr()
rating[‘bWendu’].corr(rating[‘yWendu’])

rating.cov ()
rating ['bWendu']. cov (rating ['yWendu'])

Guess you like

Origin blog.csdn.net/Sgmple/article/details/113042312