In [4]:
import numpy as np
import pandas as pd
dates = pd.date_range('20160101', periods=6)
df = pd.DataFrame(np.arange(24).reshape((6,4)), index=dates, columns=['A', 'B', 'C', 'D'])
df.iloc[0,1] = np.nan
df.iloc[1,2] = np.nan
df
Out[4]:
In [6]:
print df.dropna(axis=0, how='any') #any all
In [9]:
print(df.fillna(value=0))
In [13]:
print(pd.isnull(df))
print np.any(df.isnull) == True