3. Pandas Basic Quiz II

3. Pandas Basic Quiz II

Professional Development

10 Qs

quiz-placeholder

Similar activities

PySpark Quiz Round

PySpark Quiz Round

Professional Development

11 Qs

Body mass index (BMI) ​

Body mass index (BMI) ​

KG - Professional Development

10 Qs

Die Cage June 2024

Die Cage June 2024

Professional Development

15 Qs

VSCO girls

VSCO girls

5th Grade - Professional Development

13 Qs

Quality Online Quiz Bee Challenge

Quality Online Quiz Bee Challenge

Professional Development

10 Qs

PHPBASIC121_LuanNP1

PHPBASIC121_LuanNP1

KG - Professional Development

12 Qs

GT LAB EXAM: PART A

GT LAB EXAM: PART A

Professional Development

10 Qs

play for free coins without a answer

play for free coins without a answer

KG - Professional Development

7 Qs

3. Pandas Basic Quiz II

3. Pandas Basic Quiz II

Assessment

Quiz

Other

Professional Development

Medium

Created by

Bayu Prasetya

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

df = df.drop("B", axis=1)

Which of the following drops column "B" permanently?

Yes, if inplace=True

Yes, because reassigned to df

No, needs df.drop(columns="B")

No, drop doesn’t work for columns

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to sort dataframe by values in column "Age"

df.sort("Age")

df.sort_values("Age")

df.sort_index("Age")

df["age"].sort_values()

df["age"].sort_index()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does df.describe() do?

Shows first 5 rows

Returns summary statistics of numeric columns

Returns summary statistics from all colums

Prints schema of DataFrame

error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result of..

Mean of each row

Mean of each column

Single scalar mean

error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code groups DataFrame by column "Department" and takes mean?

df.groupby("Department").mean()

df.aggregate("Department", "mean")

df.Department.mean()

df.mean().groupby("Department")

df["Department"].mean()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this output?

Keeps NaN unchanged

Replaces all NaN with 0

Drops rows with NaN

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method resets index back to default (0,1,2...)?

df.drop_index()

df.reset_index()

df.rename_index()

df.index.reset()

df.set_index()

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?