
DataFrame Operations Quiz
Quiz
•
Computers
•
1st Grade
•
Practice Problem
•
Hard
Adham Elmuntser
Used 1+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Kuis TIK 1
Quiz
•
KG - Professional Dev...
21 questions
sistema operacional
Quiz
•
1st Grade
15 questions
Teknologi Layanan Jaringan
Quiz
•
1st - 3rd Grade
15 questions
Storage-Quiz-2
Quiz
•
1st Grade
15 questions
Internet klasa 6
Quiz
•
1st Grade - University
15 questions
3.4 Pengalamatan IP pada jaringan komputer (KOMJARDAS)
Quiz
•
1st Grade - University
20 questions
Soal Analisis Kebutuhan Bandwitdh pada Jaringan
Quiz
•
1st Grade
20 questions
ICT level 1
Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Life Cycle of a Frog
Quiz
•
1st - 2nd Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
100th Day of School 1st/2nd
Quiz
•
1st - 2nd Grade
15 questions
Reading Comprehension
Quiz
•
1st - 5th Grade
10 questions
Identifying Physical and Chemical Changes
Interactive video
•
1st - 5th Grade
10 questions
Exploring the American Revolution
Interactive video
•
1st - 5th Grade
