3. Pandas Basic Quiz II

Quiz
•
Other
•
Professional Development
•
Medium
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
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
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
Similar Resources on Wayground
14 questions
Noël 2024

Quiz
•
Professional Development
15 questions
FGD I Evaluasi Proper 2023 dan Idea Generation Hari ke-1

Quiz
•
Professional Development
10 questions
AMUL ICE-CREAM QUIZ

Quiz
•
Professional Development
15 questions
Sorting Quiz

Quiz
•
University - Professi...
10 questions
Current Affairs

Quiz
•
Professional Development
15 questions
TradenQ - QUIZ

Quiz
•
Professional Development
10 questions
RECYCLE RIGHT QUIZ

Quiz
•
Professional Development
15 questions
mentoria - python para engenharia de dados

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade