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

bookIntroduction to NumPy

NumPy is another crucial library to work with numbers especially. In this chapter, we will learn how to use NumPy to find mean, median or mode values. But to use this library, you must first import it; the alias for NumPy is usually np. Look at the example: import numpy as np.

Imagine that we work with this simple list while learning functions:

data = [1, 12, 14, 50]

Function titleImplementationResult
np.mean(data)Finds the mean value of list19.25
np.median(data)Finds the median value of list13.0
np.sum(data)Finds the sum of all values in list77
np.size(data)Finds the amount of values in list4
np.min(data)Finds the minimum value of all values in list1
np.max(data)Finds the maximim value of all values in list50

Tarefa

Your tasks here are to find the number of users, figure out the maximum and the minimum possible values of price column, and then find the median value of the price.

Follow the algorithm:

  1. Import the numpy with the np alias.
  2. In the column 'user_id' find the size.
  3. In the column 'price' find max and min values.
  4. In the column 'price' find median value.

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 10
toggle bottom row

bookIntroduction to NumPy

NumPy is another crucial library to work with numbers especially. In this chapter, we will learn how to use NumPy to find mean, median or mode values. But to use this library, you must first import it; the alias for NumPy is usually np. Look at the example: import numpy as np.

Imagine that we work with this simple list while learning functions:

data = [1, 12, 14, 50]

Function titleImplementationResult
np.mean(data)Finds the mean value of list19.25
np.median(data)Finds the median value of list13.0
np.sum(data)Finds the sum of all values in list77
np.size(data)Finds the amount of values in list4
np.min(data)Finds the minimum value of all values in list1
np.max(data)Finds the maximim value of all values in list50

Tarefa

Your tasks here are to find the number of users, figure out the maximum and the minimum possible values of price column, and then find the median value of the price.

Follow the algorithm:

  1. Import the numpy with the np alias.
  2. In the column 'user_id' find the size.
  3. In the column 'price' find max and min values.
  4. In the column 'price' find median value.

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 10
toggle bottom row

bookIntroduction to NumPy

NumPy is another crucial library to work with numbers especially. In this chapter, we will learn how to use NumPy to find mean, median or mode values. But to use this library, you must first import it; the alias for NumPy is usually np. Look at the example: import numpy as np.

Imagine that we work with this simple list while learning functions:

data = [1, 12, 14, 50]

Function titleImplementationResult
np.mean(data)Finds the mean value of list19.25
np.median(data)Finds the median value of list13.0
np.sum(data)Finds the sum of all values in list77
np.size(data)Finds the amount of values in list4
np.min(data)Finds the minimum value of all values in list1
np.max(data)Finds the maximim value of all values in list50

Tarefa

Your tasks here are to find the number of users, figure out the maximum and the minimum possible values of price column, and then find the median value of the price.

Follow the algorithm:

  1. Import the numpy with the np alias.
  2. In the column 'user_id' find the size.
  3. In the column 'price' find max and min values.
  4. In the column 'price' find median value.

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!

NumPy is another crucial library to work with numbers especially. In this chapter, we will learn how to use NumPy to find mean, median or mode values. But to use this library, you must first import it; the alias for NumPy is usually np. Look at the example: import numpy as np.

Imagine that we work with this simple list while learning functions:

data = [1, 12, 14, 50]

Function titleImplementationResult
np.mean(data)Finds the mean value of list19.25
np.median(data)Finds the median value of list13.0
np.sum(data)Finds the sum of all values in list77
np.size(data)Finds the amount of values in list4
np.min(data)Finds the minimum value of all values in list1
np.max(data)Finds the maximim value of all values in list50

Tarefa

Your tasks here are to find the number of users, figure out the maximum and the minimum possible values of price column, and then find the median value of the price.

Follow the algorithm:

  1. Import the numpy with the np alias.
  2. In the column 'user_id' find the size.
  3. In the column 'price' find max and min values.
  4. In the column 'price' find median value.

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 10
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt