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].
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 14
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Pergunte-me perguntas sobre este assunto
Resumir este capítulo
Mostrar exemplos do mundo real
Awesome!
Completion rate improved to 2.08
Deal with Several Conditions
Deslize para mostrar o menu
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].
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 14