I have a dataframe with some columns that I want to delete. I already know how to delete a column if I find some specified text, as:
df.drop(columns=[col for col in df.columns if 'text.'in str(col)],inplace=True)
I would like to also delete the columns which contains, along the total text, different patterns, as:
"text.Corolary.sub.ramdon.sta", "text.paint.ss1b.docto.not.sta"
I want to delet all the columns which contains "text." but also ".sta". How can I combine it in the same command independently of the rest of the text?