DataFrame Operations Quiz

DataFrame Operations Quiz

1st Grade

20 Qs

quiz-placeholder

Similar activities

Sepintas Tentang Buku Berwarna (DLMS/COSEM)

Sepintas Tentang Buku Berwarna (DLMS/COSEM)

KG - Professional Development

20 Qs

Pengantar Multimedia Compresi

Pengantar Multimedia Compresi

1st Grade

20 Qs

Ekstra IT - 2

Ekstra IT - 2

1st - 5th Grade

20 Qs

Pre-Test_AdobeInDesign

Pre-Test_AdobeInDesign

1st - 3rd Grade

20 Qs

Bimtek CSM

Bimtek CSM

1st - 3rd Grade

15 Qs

Mentoring1 CompTia Network+

Mentoring1 CompTia Network+

1st - 10th Grade

20 Qs

 Excel - básico

Excel - básico

1st Grade - University

20 Qs

AV1\R1 3TEC_Ciência de Dados - Aula 01 a  16

AV1\R1 3TEC_Ciência de Dados - Aula 01 a 16

1st Grade - University

15 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?

Discover more resources for Computers