Search Header Logo

Day 6 and 7

Authored by Akash 1705004

Computers

Professional Development

Used 1+ times

Day 6 and 7
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

Which method would you use to concatenate two DataFrames?

pd.merge()

pd.join()

pd.concat()

pd.append()

2.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

How can you check the first 5 rows of a DataFrame named df?

df.head()

df.first(5)

df.rows(5)

df.show(5)

3.

MULTIPLE CHOICE QUESTION

20 sec • 10 pts

How do you delete a column in a dataframe permanently?

  1. df.drop('new_column', axis=1, inplace=True)

  1. df.drop('new_column', axis=1)

  1. df.drop('new_column')

  1. df.drop('new_column', axis=1, inplace=False)

4.

MULTIPLE CHOICE QUESTION

20 sec • 10 pts

Which is the correct way to select a column from a DataFrame named df?

df.select('column_name')

df['column_name']

df.column_name

Both B and C are correct.

5.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

Which method is used to replace missing values in a DataFrame df?

df.fillna(value)

df.replace_null(value)

df.set_values(value)

df.impute(value)

6.

MULTIPLE CHOICE QUESTION

20 sec • 10 pts

How can you set multiple columns as the index of a DataFrame df?

df.set_index(['col1', 'col2'])

df.index(['col1', 'col2'])

df.primary_key(['col1', 'col2'])

df.use_index(['col1', 'col2'])

7.

MULTIPLE CHOICE QUESTION

20 sec • 10 pts

What is the output of df.describe() where df is a DataFrame?

A DataFrame summarizing the mean, median, and mode of each column

A DataFrame showing the first, second, and third quartiles of each column

A DataFrame providing descriptive statistics

A DataFrame listing the maximum and minimum values of each column

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?