Tutorial by Examples

If you want to detect missings with df=pd.DataFrame({'col':[1,np.nan]}) df==np.nan you will get the following result: col 0 False 1 False This is because comparing missing value to anything results in a False - instead of this you should use df=pd.DataFrame({'col':[1,np.nan]}) ...
Pandas don't support missing in attributes of type integer. For example if you have missings in the grade column: df= pd.read_csv("data.csv", dtype={'grade': int}) error: Integer column has NA values In this case you just should use float instead of integers or set the object dtype. ...
If you want to append a series of values [1,2] to the column of dataframe df, you will get NaNs: import pandas as pd series=pd.Series([1,2]) df=pd.DataFrame(index=[3,4]) df['col']=series df col 3 NaN 4 NaN because setting a new column automatically aligns the data by the inde...

Page 1 of 1