@mohitlearns wrote:
Hello,
I have a small DataFrame object which has the following Features:
- Day
- Temperature
- WindSpeed
- Event (Sunny, Cloudy, Snow, Rain)
I want to list “Day” and “WIndSpeed” where “WindSpeed” >4 “OR” “Temperature” >30
I am using the following command to the execute the above condition, however, its misfiring.
df[["Day","WindSpeed"]] [df["WindSpeed"]>4 | df["Temperature"]>30]
Can someone tell me what’s wrong with the above command?
I don’t want to use “.loc” or “.iloc”
Thanks
Mohit
Posts: 2
Participants: 2