Hi!
I have two problems with my code that used to work fine, maybe python updated or something. I have a dataFrame called data and try to drop rows that has ‘plant name’ either as ‘0’ or is empty. This is the code that fails now:
data = df.iloc[start_row-1:end_row-1, start_col-1:end_col]
names = df.iloc[start_row-2:start_row-1, start_col-1:end_col].astype(str)
names = names.values.tolist()
data.columns = names
data = data.reset_index(drop=True)
data = data[data['plant name'].notnull()]
data = data[data['plant name'] != '0']It gives me this error for any of the last two rows
Exception: cannot …