Python Study Group: Week 4

Python Study Group: Week 4

12th Grade

10 Qs

quiz-placeholder

Similar activities

Effective Communication

Effective Communication

University

10 Qs

Interesting Bird Facts

Interesting Bird Facts

KG - Professional Development

11 Qs

Latihan PRA PAS Sarpras Kelas XII

Latihan PRA PAS Sarpras Kelas XII

12th Grade

15 Qs

PDCA Knowledge

PDCA Knowledge

University

12 Qs

Presentation, Analysis & Interpretation of Data

Presentation, Analysis & Interpretation of Data

University - Professional Development

15 Qs

selection

selection

University

14 Qs

Persuasive Message

Persuasive Message

University

11 Qs

Space and Earth Systems

Space and Earth Systems

9th Grade - University

10 Qs

Python Study Group: Week 4

Python Study Group: Week 4

Assessment

Quiz

Professional Development

12th Grade

Practice Problem

Medium

Created by

Jeff Mao

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function in pandas is typically used to remove duplicate rows?

`drop_duplicates()`

`unique()`

`dropna()`

`remove()`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary function of the `merge()` function in pandas?

To concatenate two DataFrames vertically

To perform element-wise operations

To combine DataFrames using a common key

To clean data by removing NaN values

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of calling df.duplicated().sum() on a DataFrame df?

The number of duplicate rows in df

The number of unique rows in df

The total number of rows in df

The number of rows with missing values indf

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary function of the dropna() method in pandas?


Fill missing values with a specified value

Remove columns of a specific data type

Remove rows with missing values

Detect and remove outliers

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method should be used to replace missing values with an aggregate of a column in a pandas DataFrame?

replace()

fillna()

mean()

transform()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When merging two DataFrames in pandas, what does the `how` parameter specify?

The type of merge to perform (e.g., 'left', 'right', 'outer', 'inner')

The key to join on

How to sort the result

How to handle missing values

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is NOT a correct way to filter a DataFrame `df` to keep all rows where the column 'age' is greater than 25?

`df[df['age'] > 25]`

`df.filter(df['age'] > 25)'

`df.query('age > 25')`

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?