I need to drop all rows in a certain column where there is no value ie where it is "null". But the problem is that I do not know the name of the column. But know that it is the 5th column across so I have tired using some iloc methods like "notna" and "notnull"(see below). I have included a sample image of the type of data I am working with. The reason I am trying to do this is because there is a varying number of junk rows at the top of my csv file/dataframe that I am trying to get rid of. But the number of rows is different each time so I cannot use something that will just drop a certain known number of header rows. That is why I am trying to get rid of all null rows in a certain column because I know that it will also get rid of all the junk rows at the top of my dataset.
These are some methods I have tried using but they didn't work.
df = df[df[df.iloc[:, 4]].notna()]
df = df[pd.notnull(df[df.iloc[:, 4])]
df = df.dropna(subset=[df.iloc[:, 5]])
So for example here in this image I am trying to drop all rows where column 5 (the Date column) is null but that columns name is not "Date" yet because of the junk rows at the top. I am trying to get rid of all the null rows in column 5 so that only the populated columns remain and the junk rows at the top will be eliminated:
See the table here
