Зміст курсу
Introduction to Python for Data Analysis
Introduction to Python for Data Analysis
Introduction 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 title | Implementation | Result |
np.mean(data) | Finds the mean value of list | 19.25 |
np.median(data) | Finds the median value of list | 13.0 |
np.sum(data) | Finds the sum of all values in list | 77 |
np.size(data) | Finds the amount of values in list | 4 |
np.min(data) | Finds the minimum value of all values in list | 1 |
np.max(data) | Finds the maximim value of all values in list | 50 |
Завдання
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:
- Import the
numpy
with thenp
alias. - In the column
'user_id'
find the size. - In the column
'price'
find max and min values. - In the column
'price'
find median value.
Дякуємо за ваш відгук!
Introduction 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 title | Implementation | Result |
np.mean(data) | Finds the mean value of list | 19.25 |
np.median(data) | Finds the median value of list | 13.0 |
np.sum(data) | Finds the sum of all values in list | 77 |
np.size(data) | Finds the amount of values in list | 4 |
np.min(data) | Finds the minimum value of all values in list | 1 |
np.max(data) | Finds the maximim value of all values in list | 50 |
Завдання
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:
- Import the
numpy
with thenp
alias. - In the column
'user_id'
find the size. - In the column
'price'
find max and min values. - In the column
'price'
find median value.
Дякуємо за ваш відгук!
Introduction 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 title | Implementation | Result |
np.mean(data) | Finds the mean value of list | 19.25 |
np.median(data) | Finds the median value of list | 13.0 |
np.sum(data) | Finds the sum of all values in list | 77 |
np.size(data) | Finds the amount of values in list | 4 |
np.min(data) | Finds the minimum value of all values in list | 1 |
np.max(data) | Finds the maximim value of all values in list | 50 |
Завдання
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:
- Import the
numpy
with thenp
alias. - In the column
'user_id'
find the size. - In the column
'price'
find max and min values. - In the column
'price'
find median value.
Дякуємо за ваш відгук!
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 title | Implementation | Result |
np.mean(data) | Finds the mean value of list | 19.25 |
np.median(data) | Finds the median value of list | 13.0 |
np.sum(data) | Finds the sum of all values in list | 77 |
np.size(data) | Finds the amount of values in list | 4 |
np.min(data) | Finds the minimum value of all values in list | 1 |
np.max(data) | Finds the maximim value of all values in list | 50 |
Завдання
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:
- Import the
numpy
with thenp
alias. - In the column
'user_id'
find the size. - In the column
'price'
find max and min values. - In the column
'price'
find median value.