Error deleting rows that have NaN in a column of a dataframe


With imports of .csv files, I created the following df.

I try to delete the rows with NaN in the column "Iberdrola, using the loop.


if symbol == 'Iberdrola':
              df = df.dropna (subset = 'Iberdrola')

When executing I returned the error


TypeError: Index (...) must be called with a collection of some kind,   'Iberdrola' was passed

How could I correct this error?

asked by efueyo 24.11.2018 в 21:12

0 answers