Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Quiz: Accessing the Columns | Reading Files in Pandas
Pandas First Steps

book
Quiz: Accessing the Columns

question-icon

Match the correct code snippet with the respective operation. We have a DataFrame named cars with four columns: 'model', 'year', 'fueltype', and 'price'. This DataFrame contains 10 rows.


To extract the column, named 'fueltype' -
___

To extract the second row from DataFrame -
___

To extract columns named 'model', 'price' -
___

To extract the fifth row from DataFrame -
___

Click or drag`n`drop items and fill in the blanks

dots
cars.iloc[1]
dots
cars.iloc[4]
dots
cars[['model', 'price']]
dots
cars['fueltype']

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 4

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt