max() and min()
Pandas provides the max()
function, which returns the highest value from a specified column. Consider the following example:
To identify the highest value of a specific column, you can use this approach:
Similarly, Pandas offers the min()
function that fetches the smallest value from a given column. Here's how you can use it:
To determine the smallest value for a particular column, follow this method:
Tarefa
Given the DataFrame audi_cars
, we need to identify both the highest and lowest values from the price
column.
Tudo estava claro?
Conteúdo do Curso
Pandas First Steps
2. Reading Files in Pandas
3. Analyzing the Data
Pandas First Steps
max() and min()
Pandas provides the max()
function, which returns the highest value from a specified column. Consider the following example:
To identify the highest value of a specific column, you can use this approach:
Similarly, Pandas offers the min()
function that fetches the smallest value from a given column. Here's how you can use it:
To determine the smallest value for a particular column, follow this method:
Tarefa
Given the DataFrame audi_cars
, we need to identify both the highest and lowest values from the price
column.
Tudo estava claro?