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

Kursinnhold

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.

python

To identify the highest value of a specific column, you can use this approach:

python

Similarly, pandas offers the min() method that fetches the smallest value from a given column.

python

To determine the smallest value for a particular column, the same method is used:

python
Oppgave

Swipe to start coding

You are given a DataFrame named audi_cars.

  1. Find the highest price in the 'price' column and store the result in the max_value variable.
  2. Find the lowest price in the 'price' column and store the result in the min_value variable.
  3. Compute the average price in the 'price' column and store the result in the mean_value variable.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 3. Kapittel 12
toggle bottom row

book
max() and min()

pandas provides the max() method, which returns the highest value from a specified column.

python

To identify the highest value of a specific column, you can use this approach:

python

Similarly, pandas offers the min() method that fetches the smallest value from a given column.

python

To determine the smallest value for a particular column, the same method is used:

python
Oppgave

Swipe to start coding

You are given a DataFrame named audi_cars.

  1. Find the highest price in the 'price' column and store the result in the max_value variable.
  2. Find the lowest price in the 'price' column and store the result in the min_value variable.
  3. Compute the average price in the 'price' column and store the result in the mean_value variable.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 3. Kapittel 12
Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Vi beklager at noe gikk galt. Hva skjedde?
some-alt