I made a script for a table, but sometimes the table maker inserts some things that aren't values. I wanted to do something automatic, without having to go into the tables and remove those rows. I managed to remove these lines, but the index of the lines remains and I need the index of the lines to be correct (0, 1, 2, 3, 4, 5, 6...)
For example, in the table I'm currently using, the row with index 0 has to be removed and when I make the new table the table's index starts with 1
for i in range(table.shape[0]):
if pd.isna(table[1][i]) == True:
table = table.drop(labels=i, axis=0)
table2 = pd.DataFrame(table)