Most operations in pandas can be accomplished with operator chaining (groupby, aggregate, apply, etc), but the only way I’ve found to filter rows is via normal bracket indexing
df_filtered = df[df['column'] == value]
This is unappealing as it requires I assign df to a variable before being able to filter on its values. Is there something more like the following?
df_filtered = df.mask(lambda x: x['column'] == value)
I’m not entirely sure what you want, and your last line of code does not help either, but anyway:
“Chained” filtering is done by “chaining” the criteria in the boolean index.
If you want to chain methods, you can add your own mask method and use that one.