I have following dataframe
id pattern1 pattern2 pattern3
1 a-b-c a-b-- a-b-c
2 a-a-- a-b-- a-c--
3 a-v-- a-m-- a-k--
4 a-b-- a-n-- a-n-c
I want to filter rows that contains the pattern -- at the end in all the columns. In this case the output would be
2 a-a-- a-b-- a-c--
3 a-v-- a-m-- a-k--
So far I can only think of doing something like the following
df[(len(df['pattern1'].str.split('--')[1])==0) & \
(len(df['pattern2'].str.split('--')[1])==0) & \
(len(df['pattern3'].str.split('--')[1])==0)]
This doesn't work.Also,I can't write the names of all the columns as tehre are 20 columns. How can I filter rows where all the columns in that row match certain pattern/condition?