Pandas dropna() function not working
问题 I am trying to drop NA values from a pandas dataframe. I have used dropna() (which should drop all NA rows from the dataframe). Yet, it does not work. Here is the code: import pandas as pd import numpy as np prison_data = pd.read_csv('https://andrewshinsuke.me/docs/compas-scores-two-years.csv') That's how you get the data frame. As the following shows, the default read_csv method does indeed convert the NA data points to np.nan . np.isnan(prison_data.head()['out_custody'][4]) Out[2]: True