filter dataframe by condition python code example
Example 1: pandas filter rows by value in list
df.loc[df['col name'].isin(ls_conditions)]
Example 2: slice dataframe pandas based on condition
# To slice pandas dataframe by condition
frioMurteira = data.loc[(data["POM"] == "Murteira") & (data["TMP"] > 7.2), ["DTM","TMP"]]