
Exploring Dataframes and Matplotlib - Grade XII

Quiz
•
Computers
•
12th Grade
•
Medium
Bhoomika Anand
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary library used for creating dataframes in Python?
matplotlib
numpy
scikit-learn
pandas
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a dataframe from a dictionary in pandas?
df = pd.DataFrame.from_dict(dictionary)
df = pd.DataFrame(dictionary.values())
df = pd.DataFrame(dictionary.items())
df = pd.DataFrame(dictionary)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method would you use to view the first five rows of a dataframe?
dataframe.take(5)
dataframe.head(5)
dataframe.first(5)
dataframe.slice(0, 5)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you filter rows in a dataframe based on a condition?
Use boolean indexing, e.g., df[df['column_name'] condition].
Use the drop method to remove unwanted columns.
Use the groupby method to aggregate data.
Apply the sort_values function to rearrange rows.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to add a new column to an existing dataframe?
df.add_column('new_column', values)
df.insert('new_column', values)
df.append_column('new_column', values)
df['new_column'] = values
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you rename columns in a pandas dataframe?
df.change_columns({'old_name1': 'new_name1'})
df.update_column_names(['new_name1', 'new_name2'])
df.rename(columns={'old_name1': 'new_name1', 'old_name2': 'new_name2'}, inplace=True) or df.columns = ['new_name1', 'new_name2']
df.columns.rename({'old_name1': 'new_name1'})
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which matplotlib function is commonly used to create a line plot?
plt.plot()
plt.chart()
plt.draw()
plt.line()
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Formatting Tables Quiz

Quiz
•
5th - 12th Grade
15 questions
Microsoft Excel

Quiz
•
12th Grade
20 questions
CLASS XI - MYSQL QUIZ

Quiz
•
11th - 12th Grade
15 questions
Database starter

Quiz
•
12th Grade - University
20 questions
Spreadsheet Formulas and Functions

Quiz
•
9th - 12th Grade
15 questions
Excel - Worksheet and Formula

Quiz
•
9th Grade - University
18 questions
Python Pandas-Series

Quiz
•
12th Grade
15 questions
Basic Charts & Graphs

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade