df.rx('regex') short-hand for df.filter(regex='regex') would allow to easily pipe multiple regex statements. For example this is handy for filtering multiple sub-strings in column names without necessarily knowing the order of these sub-strings:
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.filter.html
Comment From: shoyer
I agree that df.filter(regex=...)
is quite useful, but I can't support this. We already have more DataFrame methods than most people can keep straight without looking at the docs. Adding another one with a non-descriptive name would make this problem worse.
Comment From: den-run-ai
actually I found that this regex grouping syntax may suffice in my case:
df1.filter(regex='((rx11|rx12)|(rx21|rx22))')
Comment From: gfyoung
Given the workaround and -1 from @shoyer, closing this for now. Can always re-open if need be.