Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Finding the Largest Values of a Column | Extracting Data
Advanced Techniques in pandas

bookFinding the Largest Values of a Column

In the last chapter, you learned how to output the smallest values; you can definitely do the same with the largest ones. To do so, you will use a very similar method with the same argument as the previous one: .nlargest(). Look at the example of how to output the 10 newest cars, also sorted by 'Engine_volume' - all duplicates included:

data.nlargest(10, ['Year', 'Engine_volume'], keep = 'all')
question mark

Choose the CORRECT way to get the top 100 the most expensive cars sorted, firstly by 'Price' and then by 'Year', not including duplicates - just the first 100 values.

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Awesome!

Completion rate improved to 3.03

bookFinding the Largest Values of a Column

Deslize para mostrar o menu

In the last chapter, you learned how to output the smallest values; you can definitely do the same with the largest ones. To do so, you will use a very similar method with the same argument as the previous one: .nlargest(). Look at the example of how to output the 10 newest cars, also sorted by 'Engine_volume' - all duplicates included:

data.nlargest(10, ['Year', 'Engine_volume'], keep = 'all')
question mark

Choose the CORRECT way to get the top 100 the most expensive cars sorted, firstly by 'Price' and then by 'Year', not including duplicates - just the first 100 values.

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6
some-alt