DSES DataFrame Operations Quiz

DSES DataFrame Operations Quiz

University

20 Qs

quiz-placeholder

Similar activities

DWDM Unit1 Quiz

DWDM Unit1 Quiz

University

21 Qs

Trắc nghiệm excel - 1

Trắc nghiệm excel - 1

KG - University

20 Qs

Midterm Quiz

Midterm Quiz

University

15 Qs

Method

Method

University

15 Qs

Word Processing Lessons 3 and 4 Review

Word Processing Lessons 3 and 4 Review

KG - University

20 Qs

Informatika Kelas 5 Bab 2

Informatika Kelas 5 Bab 2

5th Grade - University

19 Qs

Lv1 Chapter 3 Basics of SQL

Lv1 Chapter 3 Basics of SQL

University

18 Qs

ภาษา SQL

ภาษา SQL

University

22 Qs

DSES DataFrame Operations Quiz

DSES DataFrame Operations Quiz

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Mrs. Getzi Jeba 495

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function sorts a DataFrame df by the column 'Salary' in ascending order?

df.sort_values('Salary')

df.sort('Salary')

df.order_by('Salary')

df.arrange('Salary')

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does df.dropna(subset=['Age']) do?

Drops rows where 'Age' is missing

Drops all columns with missing values

Fills missing 'Age' values with zero

Drops the 'Age' column

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you select rows where 'Department' is 'HR'?

df[df['Department'] == 'HR']

df.query('Department = HR')

df.filter('HR')

df.select('Department == HR')

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of df.groupby('City')['Population'].sum()?

Total population per city

Average population per city

Number of cities

Sorted population values

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add a column 'Tax' as 15% of 'Income'?

df['Tax'] = df['Income'] * 0.15

df.insert('Tax', df['Income'] * 0.15)

df.assign(Tax = df.Income * 0.15)

df.new_column('Tax', df['Income'] * 0.15)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does df.describe() return?

Summary statistics for numeric columns

Column names

Missing value counts

First 5 rows

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you rename the column 'OldName' to 'NewName'?

df.rename(columns={'OldName': 'NewName'})

df.columns.replace('OldName', 'NewName')

df['NewName'] = df['OldName']

df.set_column_name('OldName', 'NewName')

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?