DataFrame Operations Quiz

DataFrame Operations Quiz

1st Grade

20 Qs

quiz-placeholder

Similar activities

KOD ARAHAN HTML

KOD ARAHAN HTML

1st - 3rd Grade

20 Qs

TUGAS-1-TLJ

TUGAS-1-TLJ

1st - 2nd Grade

17 Qs

МашОб №26 Тест

МашОб №26 Тест

1st - 3rd Grade

20 Qs

CCNA Wendel Odom Part 1 - Ch1 to Ch3

CCNA Wendel Odom Part 1 - Ch1 to Ch3

1st - 10th Grade

23 Qs

Business Analytics Python 02

Business Analytics Python 02

1st - 3rd Grade

19 Qs

Season 4 #Spaic Machine learning Weekly Quiz

Season 4 #Spaic Machine learning Weekly Quiz

KG - Professional Development

20 Qs

Teknologi Layanan Jaringan - Remidi Semester 1

Teknologi Layanan Jaringan - Remidi Semester 1

1st Grade

20 Qs

Season 2 #Spaic Python Weekly Quiz

Season 2 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

DataFrame Operations Quiz

DataFrame Operations Quiz

Assessment

Quiz

Computers

1st Grade

Hard

Created by

Adham Elmuntser

Used 1+ times

FREE Resource

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)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?