Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте max() and min() | Section
Data Manipulation with pandas
Секція 1. Розділ 20
single

single

bookmax() and min()

Свайпніть щоб показати меню

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

df = pd.read_csv(file.csv)
max_value = df.max()

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

df = pd.read_csv(file.csv)
max_values = df['column_name'].max()

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

df = pd.read_csv(file.csv)
min_value = df.min()

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

df = pd.read_csv(file.csv)
min_values = df['column_name'].min()
Завдання

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 highest_price variable.
  2. Find the lowest price in the 'price' column and store the result in the lowest_price variable.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 20
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

some-alt