Search Header Logo

Pandas

Authored by Hamid Bekamiri

Mathematics

University

Used 2+ times

Pandas
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. Which method is used to select rows based on their labels in a pandas DataFrame?

A) df.loc[]

B) df.iloc[]

C) df.at[]

D) df.iat[]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. To select data by integer location in a pandas DataFrame, which method should you use?

A) df.loc[]

B) df.iloc[]

D) df.iat[]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. What does df[df['column'] > 5] return in pandas?

A) All rows where 'column' values are greater than 5

B) All columns where any value is greater than 5

C) The original DataFrame unchanged

D) An error message

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. Which method is used to combine two DataFrames along rows in pandas?

  • A) pd.merge()

  • B) df.append()

  • C) pd.join()

  • D) pd.concat()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. What is the primary function of pd.merge() in pandas?

  • A) Concatenate DataFrames vertically

  • B) Merge DataFrames horizontally based on a key

  • C) Append one DataFrame to another

  • D) Stack DataFrames

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. Which parameter in df.groupby() specifies the aggregation function?

  • A) by

  • B) function

  • C) agg

  • D) as_index

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. When performing a pd.merge(), which parameter defines the type of merge to be performed?

  • A) on

  • B) how

  • C) left_on

  • D) right_on

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?