Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

slice dataframe pandas based on condition

# To slice pandas dataframe by condition

frioMurteira = data.loc[(data["POM"] == "Murteira") & (data["TMP"] > 7.2), ["DTM","TMP"]]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #slice #dataframe #pandas #based #condition
ADD COMMENT
Topic
Name
3+7 =