Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Deal with Several Conditions | Explore Dataset
Introduction to Python for Data Analysis
course content

Зміст курсу

Introduction to Python for Data Analysis

Introduction to Python for Data Analysis

1. Introduction to Python 1/2
2. Introduction to Python 2/2
3. Explore Dataset
4. Becoming an Analyst

book
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].

question-icon

Calculate the number of users who choose the 'week' or 'year' plan. You should work with the data that titled as df.

df = df.[== 'week' df['plan']]

Натисніть або перетягніть елементи та заповніть пропуски

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 14
We're sorry to hear that something went wrong. What happened?
some-alt