WorksheetsPython Pandas (ai gen)
Total questions: 10
Worksheet time: 3mins
Name
Class
Date
1.
What is the primary data structure in Pandas that is used to store and manipulate data?
a)
Array
b)
List
c)
DataFrame
d)
Dictionary
2.
Which Pandas function is used to load a CSV file into a DataFrame?
a)
pd.load_csv()
b)
pd.read_csv()
c)
pd.open_csv()
d)
pd.import_csv()
3.
Which method is used to display the first few rows of a DataFrame?
a)
df.head()
b)
df.first()
c)
df.show()
d)
df.top()
4.
What is the Pandas function used to filter rows in a DataFrame based on a specific condition?
a)
filter_rows()
b)
select()
c)
query()
d)
filter()
5.
Which function is used to calculate summary statistics for numerical columns in a DataFrame?
a)
df.summary()
b)
df.statistics()
c)
describe()
d)
summary_stats()
6.
What method is used to replace missing values in a DataFrame with a specified value?
a)
replace_null()
b)
fill_na()
c)
fill_missing()
d)
replace_missing()
7.
Which plot type is best suited for comparing the distribution of a numerical variable in a DataFrame?
a)
Pie chart
b)
Histogram
c)
Line plot
d)
Scatter plot
8.
What is the Pandas function used to group data in a DataFrame based on one or more columns?
a)
group_by()
b)
group()
c)
group_data()
d)
groupby()
9.
Which Pandas method is used to merge two DataFrames based on a common column?
a)
merge()
b)
combine()
c)
join()
d)
concat()
10.
How do you drop duplicate rows in a Pandas DataFrame?
a)
df.drop_duplicates()
b)
df.remove_duplicates()
c)
df.delete_duplicates()
d)
df.deduplicate()
100 %
