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

Conteúdo do Curso

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

bookRecall 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.

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 12
toggle bottom row

bookRecall 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.

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 12
toggle bottom row

bookRecall 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.

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

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.

Tarefa

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.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 12
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt