
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

In: df[‘ST_NUM’].isnull() Out: False False True False
In: df[‘OWN_OCC’].isnull() Out: False False False False
In: missing = [“—”,”n/a”] pd.read_csv(“data.csv”, na_values=missing) df[‘OWN_OCC’] Out: NaN Y NaN N In: df['ST_NUM'].fillna(125, inplace=True) df[‘ST_NUM’] Out: 104 197 125 201 In: df.loc[2, ‘OWN_OCC’] = ‘Y’ df[‘OWN_OCC’] Out: -- Y Y N In: df2.isnull().sum() Out: ST_NUM 1 OWN_OCC 2 In: df2.isnull().values.any() Out: True In: df2.isnull().sum().sum() Out: 3