DSES DataFrame Operations Quiz

DSES DataFrame Operations Quiz

University

20 Qs

quiz-placeholder

Similar activities

QUIZZ 2 week 2 (IT 11)

QUIZZ 2 week 2 (IT 11)

University

20 Qs

SQL and Database Quiz

SQL and Database Quiz

University

15 Qs

DBMS LAB

DBMS LAB

University

20 Qs

Data Science (Data Preparation & Visualitation)/Pandas Python

Data Science (Data Preparation & Visualitation)/Pandas Python

University

20 Qs

FDA FINAL QUIZ

FDA FINAL QUIZ

University

20 Qs

Mastering Data Preparation with Pandas

Mastering Data Preparation with Pandas

University

15 Qs

Microsoft Excel

Microsoft Excel

University

20 Qs

Chapter : 9 Working with tables

Chapter : 9 Working with tables

5th Grade - University

15 Qs

DSES DataFrame Operations Quiz

DSES DataFrame Operations Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Mrs. Getzi Jeba 495

Used 1+ times

FREE Resource

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')

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?