Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
max() and min() | Analyzing the Data
Pandas First Steps
course content

Course Content

Pandas First Steps

Pandas First Steps

1. The Very First Steps
2. Reading Files in Pandas
3. Analyzing the Data

book
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:

Task
test

Swipe to show code editor

Your goal is to compute key statistical values for the 'price' column and analyze their relationships.

  1. Find the highest price in the 'price' column.
  2. Find the lowest price in the 'price' column.
  3. Compute the average price in the 'price' column.
  4. Calculate and print the difference between:
    • The maximum value and the mean value;
    • The mean value and the minimum value.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 12
toggle bottom row

book
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:

Task
test

Swipe to show code editor

Your goal is to compute key statistical values for the 'price' column and analyze their relationships.

  1. Find the highest price in the 'price' column.
  2. Find the lowest price in the 'price' column.
  3. Compute the average price in the 'price' column.
  4. Calculate and print the difference between:
    • The maximum value and the mean value;
    • The mean value and the minimum value.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 12
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt