Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Recall Loops | 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

Recall Loops

Imagine that you want to count how many 'Data Scientist' jobs are in the dataset. You are already familiar with the loops and if/else statements. Try it.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

In this chapter, you count values in a straightforward but irrational way. Imagine that you have thousands of rows in the dataset; such a loop may take even an hour to process, depending on the dataset's size and the computer's power. Thus, in the next section, you will learn how to do the same thing but in a way that pandas offer you.

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

Секція 3. Розділ 12
toggle bottom row

Recall Loops

Imagine that you want to count how many 'Data Scientist' jobs are in the dataset. You are already familiar with the loops and if/else statements. Try it.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

In this chapter, you count values in a straightforward but irrational way. Imagine that you have thousands of rows in the dataset; such a loop may take even an hour to process, depending on the dataset's size and the computer's power. Thus, in the next section, you will learn how to do the same thing but in a way that pandas offer you.

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

Секція 3. Розділ 12
toggle bottom row

Recall Loops

Imagine that you want to count how many 'Data Scientist' jobs are in the dataset. You are already familiar with the loops and if/else statements. Try it.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

In this chapter, you count values in a straightforward but irrational way. Imagine that you have thousands of rows in the dataset; such a loop may take even an hour to process, depending on the dataset's size and the computer's power. Thus, in the next section, you will learn how to do the same thing but in a way that pandas offer you.

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

Imagine that you want to count how many 'Data Scientist' jobs are in the dataset. You are already familiar with the loops and if/else statements. Try it.

Завдання

Follow the algorithm:

  1. Create a for loop that iterates through the 'job_title' column in the df.
  2. Within the for loop, implement the if statement that checks if i is equal to 'Data Scientist'.
  3. Within the if statement, increase the count variable by 1.

In this chapter, you count values in a straightforward but irrational way. Imagine that you have thousands of rows in the dataset; such a loop may take even an hour to process, depending on the dataset's size and the computer's power. Thus, in the next section, you will learn how to do the same thing but in a way that pandas offer you.

Секція 3. Розділ 12
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt