which syringe filter dataframe
pandas: filter rows of DataFrame with operator chaining
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') Share Improve this answer Follow edited Feb 13, 2020 at 15:56 Rémy Hosseinkhan Boucher
How to filter a Pandas DataFrame | Sof...