Trying to remove empty cells in a column in csv from my data using pandas dataframe
Are you sure they are empty? Did you check to see they're not just empty strings ("")?
dropna is the proper method, unless you want to also drop cells with empty strings.
Please elaborate, thank you
I am trying to remove the empty cells from my column A of my data which had text data in it.
My csv which I imported into data frame has 50k rows containing search data in column A.
I tried the below options.
df= df.replace(r'^s*$', float('NaN'), regex = True)
df.replace("", np.nan, inplace=True)
df.dropna(subset=['A'], inplace=True)
Still there are empty cells