PythonFan.org
Toggle Menu
Home
Online Python Compiler
Tutorials
Python FastAPI
Python Pandas
Python PyTorch
Python Seaborn
Blog
All Posts
Python Data Science Essentials
Quiz covering NumPy,Pandas,Seaborn,and Matplotlib basics.
1. Which Python library is primarily used for data manipulation and analysis with DataFrames?
Pandas
NumPy
Matplotlib
Scikit-learn
2. Which of the following are key features of NumPy arrays compared to Python lists? (Select all that apply)
Homogeneous data types
Dynamic resizing
Faster numerical operations
Built-in label indexing
3. A Pandas Series can contain elements of different data types.
True
False
4. What is the abbreviation for the NumPy data structure used to store multi-dimensional numerical data?
5. Which Matplotlib function is used to create a scatter plot?
plt.scatter()
plt.plot()
plt.bar()
plt.hist()
6. Which of the following are valid methods for handling missing values in a Pandas DataFrame? (Select all that apply)
dropna()
fillna()
impute()
interpolate()
7. Scikit-learn provides tools for deep learning tasks like neural networks.
True
False
8. What does the Pandas method 'df.groupby()' primarily facilitate?
Data aggregation by categories
Sorting rows alphabetically
Merging two DataFrames
Creating pivot tables
9. Which of the following are core components of a Pandas DataFrame? (Select all that apply)
Rows (observations)
Columns (variables)
Index labels
3D axes
10. NumPy arrays are mutable, meaning their elements can be modified after creation.
True
False
11. Which function is used to split a dataset into training and testing sets in scikit-learn?
train_test_split
split_data
train_test_split()
data_split()
12. Which of the following are statistical functions available in NumPy? (Select all that apply)
np.mean()
np.sum()
np.append()
np.median()
13. Pandas DataFrames are immutable, meaning their structure cannot be modified after creation.
True
False
14. What is the output of np.array([1, 2, 3]) + np.array([4, 5, 6])?
[5, 7, 9]
[[1,2,3],[4,5,6]]
Error: cannot add arrays
15
15. Which of the following visualization libraries are built on top of Matplotlib? (Select all that apply)
Seaborn
Plotly
Altair
ggplot
16. Name the Pandas method used to compute summary statistics (mean, std, min, max) for numerical columns in a DataFrame.
17. Which data type does Pandas use to represent missing values in numerical columns?
NaN
None
NA
Null
18. Which of the following operations can be performed with NumPy's broadcasting feature? (Select all that apply)
Adding a scalar to an array
Multiplying a 1D array with a 2D array
Dividing two arrays of different sizes without compatible dimensions
Reshaping an array from 1D to 3D
19. What is the name of the scikit-learn module used for linear regression models?
20. Which method is used to combine two Pandas DataFrames vertically (stacking rows)?
pd.concat()
pd.merge()
pd.join()
pd.append()
Reset
Answered 0 of 0 — 0 correct