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]
.
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 14
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 2.08
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]
.
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 14