Quiz Yourself: Data Analysis with Pandas

Let's take a short quiz on what we’ve learned about data analysis with Pandas.

Data analysis with Pandas

1

Let’s say we want to group the products in a DataFrame called df by the color and brand columns. What is the correct syntax for the groupby function for this case?

A)

df.groupby("color", "brand")

B)

df.groupby("color").groupby("brand")

C)

df.groupby(["color","brand"])

Question 1 of 40 attempted

Get hands-on with 1400+ tech skills courses.