
Want rows in a Python Pandas data frame that might have several values? You can use the | operator, but be sure to use () to avoid precedence issues:
(
df
.loc[((pd.col('passenger_count') == 5) |
(pd.col('passenger_count') == 7))]
)

Want rows in a Python Pandas data frame that might have several values? You can use the | operator, but be sure to use () to avoid precedence issues:
(
df
.loc[((pd.col('passenger_count') == 5) |
(pd.col('passenger_count') == 7))]
)