def clean_doc (df):
for rownum in range(0,df.shape[0]):
if "LM_" not in df.iloc[rownum][6]:
clean_df = df.drop([df.index[rownum]])
return clean_df
I want to delete a row if it does not start with "LM_"
Also tried:
df.drop([rownum])
and many more, but it only deletes one line of my dataset.. but it should be a lot more