DataFrame Operations Quiz

DataFrame Operations Quiz

1st Grade

20 Qs

quiz-placeholder

Similar activities

QUIZ

QUIZ

1st Grade

20 Qs

HTML

HTML

1st - 5th Grade

20 Qs

Soal Quiz Sistem Komputer Kelas 8 SMPIT IF Mungkid

Soal Quiz Sistem Komputer Kelas 8 SMPIT IF Mungkid

1st Grade - University

15 Qs

ASK T1 BAB 2(PERWAKILAN DATA)

ASK T1 BAB 2(PERWAKILAN DATA)

1st Grade

20 Qs

B Words GCSE Computer Science

B Words GCSE Computer Science

1st - 10th Grade

15 Qs

SOAL LATIHAN MICROSOFT EXCEL

SOAL LATIHAN MICROSOFT EXCEL

1st Grade

20 Qs

ASK T1 KOD ARAHAN HTML

ASK T1 KOD ARAHAN HTML

1st Grade

20 Qs

Latihan US TKJ-Sesion 1

Latihan US TKJ-Sesion 1

1st Grade

20 Qs

DataFrame Operations Quiz

DataFrame Operations Quiz

Assessment

Quiz

Computers

1st Grade

Practice Problem

Hard

Created by

Adham Elmuntser

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a DataFrame from a dictionary?

pd.DataFrame(dict)

pd.DataFrame.from_dict()

pd.DataFrame(data)

pd.DataFrame.from_dict(data)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you read a CSV file into a DataFrame?

pd.read_csv('file.csv')

pd.read_file('file.csv')

pd.read('file.csv')

pd.DataFrame('file.csv')

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you display the first 5 rows of a DataFrame?

df.show(5)

df.head(5)

df.first(5)

df.top(5)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access a specific column in a DataFrame?

df.column('Age')

df.columns.Age

df['Age']

df.Age

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you filter rows based on a condition?

df.filter(df['Age'] >= 30)

df.loc[df['Age'] >= 30]

df[df['Age'] >= 30]

df.select(df['Age'] >= 30)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add a new column to the DataFrame?

df.insert('Salary', [50000, 60000, 70000])

df['Salary'] = [50000, 60000, 70000]

df.set_column('Salary', [50000, 60000, 70000])

df.add_column('Salary', [50000, 60000, 70000])

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you rename a column in a DataFrame?

df.rename_column('Age', 'Years', inplace=True)

df.rename_column({'Age': 'Years'}, inplace=True)

df.rename(columns={'Age': 'Years'}, inplace=True)

df.rename({'Age': 'Years'}, inplace=True)

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?