I would like to filter some columns from my dataframe. The easiest way would be to use the "like" approach (since I have a lot of columns I want to get rid of). I tried df = df.filter(['a', 'b']) like it was advised here: How to delete all columns in DataFrame except certain ones?.
But when I do it like that all my columns disappear...I don't know where my mistake is.
data = pd.concat([pd.read_table(f, encoding='unicode_escape')
.add_suffix(f[+47:-4]) # add prefix
for f in file_list], axis=1)
main_dataframe = pd.DataFrame(data)
main_dataframe = pd.concat([main_dataframe, data], axis = 1)
main_dataframe = main_dataframe.filter(like='date_')