Deal with Several Conditions
If you want to implement several conditions, you can do this easily.
- If you want to check dataset for the first and second condition to be True, just use
&
statement:
DataFrame.loc[condition1 & condition2]
- If you want to check dataset for the first or the second condition to be True, just use
|
statement:
DataFrame.loc[condition1 | condition2]
.
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 14
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 2.08
Deal with Several Conditions
Pyyhkäise näyttääksesi valikon
If you want to implement several conditions, you can do this easily.
- If you want to check dataset for the first and second condition to be True, just use
&
statement:
DataFrame.loc[condition1 & condition2]
- If you want to check dataset for the first or the second condition to be True, just use
|
statement:
DataFrame.loc[condition1 | condition2]
.
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 14