Course Content
Pandas First Steps
Pandas First Steps
max() and min()
pandas
provides the max()
method, which returns the highest value from a specified column.
To identify the highest value of a specific column, you can use this approach:
Similarly, pandas
offers the min()
method that fetches the smallest value from a given column.
To determine the smallest value for a particular column, the same method is used:
Swipe to show code editor
Your goal is to compute key statistical values for the 'price'
column and analyze their relationships.
- Find the highest price in the
'price'
column. - Find the lowest price in the
'price'
column. - Compute the average price in the
'price'
column. - Calculate and print the difference between:
- The maximum value and the mean value;
- The mean value and the minimum value.
Solution
Thanks for your feedback!
max() and min()
pandas
provides the max()
method, which returns the highest value from a specified column.
To identify the highest value of a specific column, you can use this approach:
Similarly, pandas
offers the min()
method that fetches the smallest value from a given column.
To determine the smallest value for a particular column, the same method is used:
Swipe to show code editor
Your goal is to compute key statistical values for the 'price'
column and analyze their relationships.
- Find the highest price in the
'price'
column. - Find the lowest price in the
'price'
column. - Compute the average price in the
'price'
column. - Calculate and print the difference between:
- The maximum value and the mean value;
- The mean value and the minimum value.
Solution
Thanks for your feedback!