In [3]:
import pandas as pd
df = pd.DataFrame([[1,2,3],[4,5,6]],index=['a','b'],columns=['A','B','C'])
df
Out[3]:
In [4]:
df.sum()
Out[4]:
In [6]:
df.sum(axis=1)
Out[6]:
In [7]:
df.sum(axis='columns')
Out[7]:
In [8]:
df.mean()
Out[8]:
In [9]:
df.mean(axis=1)
Out[9]:
In [10]:
df.median()
Out[10]:
In [11]:
df = pd.read_csv('C:/JupyterWork/data/titanic.csv')
df.head()
Out[11]:
In [12]:
df.cov()
Out[12]:
In [13]:
df.corr()
Out[13]:
In [14]:
df['Age'].value_counts()
Out[14]:
In [15]:
df['Age'].value_counts(ascending = True)
Out[15]:
In [16]:
df['Pclass'].value_counts(ascending = True)
Out[16]:
In [19]:
df['Age'].value_counts(ascending = True,bins = 5)
Out[19]:
In [20]:
df['Age'].count()
Out[20]:
In [21]:
print(help(pd.value_counts))
In [ ]: