Most operations in pandas can be accomplished with operator chaining (groupby, aggregate, apply, etc), but the only way I
pandas
groupby
aggregate
apply
Filters can be chained using a Pandas query:
df = pd.DataFrame(np.random.randn(30, 3), columns=['a','b','c']) df_filtered = df.query('a > 0').query('0 < b < 2')
Filters can also be combined in a single query:
df_filtered = df.query('a > 0 and 0 < b < 2')