dropna
is not an inplace operation, you need to reassign it back to the variable or use the inplace
parameter set to True.
df = df.dropna(axis=0, how='all')
or
df.dropna(axis=0, how='all', inplace=True)
Edit
Jay points out in the comments that, you need to reorder you code logic such that you dropna after the read_csv.