DSES DataFrame Operations Quiz

DSES DataFrame Operations Quiz

University

20 Qs

quiz-placeholder

Similar activities

PL-300

PL-300

University

20 Qs

Ecxel

Ecxel

3rd Grade - Professional Development

15 Qs

Relational Algebra and Calculus

Relational Algebra and Calculus

University

20 Qs

Quiz tổng hợp_Access

Quiz tổng hợp_Access

10th Grade - University

18 Qs

SECOND QUIZ

SECOND QUIZ

University

20 Qs

Veritabanı

Veritabanı

University

20 Qs

Arrays

Arrays

University

20 Qs

Parallel & Distributed Database

Parallel & Distributed Database

University

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

Create a free account and access millions of resources

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?