How do I drop all rows in a DataFrame that have NAN in that row, in a specified column?
df_transposed.dropna(subset=[78], in place=True) #returns dataframe with rows that have missing values in column 78 removed.
EDIT: (User error, I wasn't scanning entire dataframe. Delete Question if needed )A page I found had a solution that claimed to drop all rows with NAN in a selected column. In this case I am interested in the column with index 78 (int, not string, I checked).
The code fragment they provided turns out to look like this for me:
df4=df_transposed.dropna(subset=[78])
That did exactly the opposite of what I wanted. df4 is a dataframe that has NAN in all elements of the dataframe. I'm not sure how to
I tried the dropna() method as suggested on half a dozen pages and I expected a dataframe with no NAN values in the column with index 78. Instead every element was NAN in the dataframe.