I have a pandas DataFrame df:
import pandas as pd data = {"Name": ["AAAA", "BBBB"], "C1": [25, 12], "C2": [2, 1], "C3": [1, 10]} df = pd.DataFrame(data) df.set_index("Name") which looks like this when printed (for reference):
C1 C2 C3 Name AAAA 25 2 1 BBBB 12 1 10 I would like to choose rows for which C1, C2 and C3 have values between 0 and 20.
Can you suggest an elegant way to select those rows?