Font size
S
M
L
XL
WorksheetsPython for Analysis Quiz
Total questions: 15
Worksheet time: 8mins
Name
Class
Date
1.
What Python library is commonly used for creating plots and charts?
(a)
2.
Which of the following are types of charts used for categorical data?
a)
Bar chart
b)
Pie chart
c)
Line chart
d)
Scatter plot
3.
Which chart type is best suited for showing change over time?
a)
Bar chart
b)
Pie chart
c)
Line chart
d)
Histogram
4.
What type of data is typically shown with a bar chart?
a)
Continuous values
b)
Categorical data
c)
Time series
d)
Geographical maps
5.
Which library is commonly used for visualising dataframes in a statistical context?
a)
numpy
b)
pandas
c)
seaborn
d)
json
6.
What does df.plot() return when used in pandas?
a)
A DataFrame
b)
A matplotlib plot
c)
A CSV file
d)
A list
7.
Which of the following are ways to customize a chart using matplotlib?
a)
Add title
b)
Change color
c)
Use pivot tables
d)
Adjust axis labels
8.
Which function is used to convert a column into datetime format in pandas?
a)
pd.to_datetime()
b)
pd.as_datetime()
c)
pd.convert_time()
d)
pd.time_parse()
9.
Which column types are required for time-based plots in pandas?
a)
datetime
b)
object
c)
float
d)
timedelta
10.
Which function would you use to calculate a percentage change over time?
a)
df.corr()
b)
df.shift()
c)
df.pct_change()
d)
df.describe()
11.
extracts the (a) from a datetime column.
12.
Which of the following are datetime components that can be extracted in pandas?
a)
day
b)
month
c)
emoji
d)
weekday
13.
What is a common use of .resample('M') in time series analysis?
a)
Remove duplicates
b)
Rescale all values
c)
Aggregate by month
d)
Rename columns
14.
You can use df['date'] > '2024-01-01' to (a) your data.
15.
Which chart types are best suited to visualize returns over time?
a)
Line chart
b)
Heatmap
c)
Pie chart
d)
Area chart
Reset
