I have a pandas DataFrame df:
pandas
DataFrame
df
import pandas as pd data = {\"Name\": [\"AAAA\", \"BBBB\"], \"C1\": [25, 12],
I think below should do it, but its elegance is up for debate.
new_df = old_df[((old_df['C1'] > 0) & (old_df['C1'] < 20)) & ((old_df['C2'] > 0) & (old_df['C2'] < 20)) & ((old_df['C3'] > 0) & (old_df['C3'] < 20))]