Practice Selecting Columns and Rows - 9.5.1 | 9. Data Analysis using Python | CBSE Class 12th AI (Artificial Intelligence)
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

How do you select a single column named 'Age'?

💡 Hint: Remember the single brackets for selecting a single column.

Question 2

Easy

What code would you use to select the first row of a DataFrame?

💡 Hint: Think about which index corresponds to the first position.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What method do you use to select a specific column from a DataFrame?

  • df.select()
  • df['ColumnName']
  • df.column('ColumnName')

💡 Hint: Focus on how you reference a column in a DataFrame.

Question 2

True or False: iloc allows you to select data by column names.

  • True
  • False

💡 Hint: Think about whether iloc uses names or indices.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Given a DataFrame with student marks, write the code to select the first four rows and the columns 'Name' and 'Marks'.

💡 Hint: Think about how to combine both row and column selection.

Question 2

How would you modify your code to select all rows for the 'Weekly_Study_Hours' column if you can only access the full DataFrame?

💡 Hint: Remember that ':' can denote all rows in selections.

Challenge and get performance evaluation