I'm using this to conditionally select rows of column
:
X.loc[data['column'] == 1]
But I want to expand this condition to several columns. These columns have something in common: They contain a same string. So actually I have a column1
, a column2
, ... , column100
etc. and this condition should apply to all of these columns. Actually something like this (wildcard):
X.loc[data['column*'] == 1]
These conditions should be linked with OR
. Any chance to do this easily?