Dropping rows based on multi-index condition / character in Pandas

Viewed 1396

The dataframe below is a multi-indexed dataframe with hierarchical columns (df):

                   EMG                                     Biofeedback    
Time     ID  
                   delta theta alpha beta high beta gamma  HeartRateVariabilty GSR     
20170101 PD102       4     5     8    3         0     9                1        2 
20170102 PD102       5     7     8    4         6     5                2        3       
20170101 SS104-1     3     4     4    5         2     4                8        2
20170101 SS104       3     4     3    4         2     4                8        2

How can i drop all rows that contain '-' (a dash) in the index i.e drop SS104-1?

1 Answers
Related