How to extract a subset from a data frame? Let's say I have a dataframe that contains several columns including a column called A (containing integers).

I would only like to consider the rows of table that correspond to $A \ge 3$.

What would be the syntax for this?
There are several ways

df[df['A']&gt;=3]


Maybe using query

df.query('A &gt;=3')


Or using the .loc

df.loc[df['A'] &gt;= 3]


This question is posted on several places.