I have many columns name with string with (t+1) (t+2) .... (t+54)
In pictured attached, How can I drop just only columns "lemon(t+1),....,lemon(t+30), not lemon(t-1)
cols = df.columns # get columns of the dataframe
# filter the list of columns by removeing items from 'lemon(t+1)' to 'lemon(t+30)'
cols2 = filter(lambda x: not (x.startswith('lemon(t+') and x[8:-1]>0 and x[8:-1]<31) )
df_result = df[cols2] # create needed dataframe