← All quizzes

🤖 Data & AI

NumPy & pandas

Broadcasting, axes, loc vs iloc, groupby and merges. The data wrangling every ML project starts with.

8questions

mediumdifficulty

+16max XP (1st try)

not rated yet

Question 1 of 8

Adding NumPy arrays of shapes (3, 1) and (1, 4) gives an array of shape:

Question 2 of 8

What is np.arange(6).reshape(2, 3).sum(axis=0)?

Question 3 of 8

In pandas, how do df.loc and df.iloc differ?

Question 4 of 8

What does df.groupby('city')['sales'].sum() return?

Question 5 of 8

By default, df.dropna() removes:

Question 6 of 8

Why is a vectorised NumPy operation usually much faster than a Python loop?

Question 7 of 8

pd.merge(a, b, on='id', how='left') keeps:

Question 8 of 8

What does df.shape return?

0/8 answered

Part of