WorksheetsPandas Data Handling
Total questions: 13
Worksheet time: 7mins
What is data filtering in pandas?
Data filtering in pandas refers to merging multiple DataFrames.
Data filtering in pandas is the process of sorting data alphabetically.
Data filtering in pandas is the process of selecting rows or columns of a DataFrame based on specified conditions or criteria.
Data filtering in pandas involves converting data types within a DataFrame.
How can you filter data based on a specific condition in pandas?
Using the 'iloc' method with the condition inside square brackets
Directly modifying the data without any condition
Using the 'loc' method with the condition inside square brackets
Applying the 'filter' function with the condition as an argument
Explain the difference between loc and iloc in pandas.
loc is position-based, iloc is label-based
loc is label-based, iloc is integer position-based
loc is integer-based, iloc is label-based
loc is label-based, iloc is position-based
What is the purpose of the isnull() method in pandas?
To calculate the mean of a Series
To detect missing values in a DataFrame or Series.
To sort the data in a DataFrame
To convert strings to integers in a Series
What is data visualization in pandas?
Data visualization in pandas involves writing code without any visual output
Data visualization in pandas is a process of converting text data into audio files
Data visualization in pandas involves creating plots, charts, and graphs to help understand and analyze data more effectively.
Data visualization in pandas refers to creating 3D models
List some commonly used plots for data visualization in pandas.
heatmap plots
line plots, bar plots, scatter plots, histogram plots, box plots
area plots
pie plots
How can you create a line plot in pandas?
df.plot(kind='bar')
df.plot(kind='line')
df.plot(kind='hist')
df.plot(kind='scatter')
What is the purpose of the histogram plot in pandas?
To display the mean value of a numerical variable
To visualize the distribution of a numerical variable by displaying the frequency of observations within each bin.
To show the correlation between two numerical variables
To represent the trend of a time series data
How can you customize the appearance of a plot in pandas?
Modify the data source
Change the font style
Adjust the page margins
Use parameters like 'color', 'linestyle', 'linewidth', 'marker', 'title', 'xlabel', 'ylabel', 'grid', 'legend' in the plot function or by accessing the plot object to customize the appearance.
What is the role of the legend in a pandas plot?
The legend in a pandas plot adjusts the axis labels.
The legend in a pandas plot provides information about the elements displayed in the plot.
The legend in a pandas plot changes the color scheme of the plot.
The legend in a pandas plot determines the plot size.
How can you save a plot as an image file in pandas?
plot_object.savefig('filename.png')
plot_object.save('filename.png')
plot_object.export('filename.png')
plot_object.save_image('filename.png')
Explain the concept of subplots in pandas data visualization.
Subplots in pandas data visualization are used to remove outliers from the dataset.
Subplots in pandas data visualization are only applicable to categorical data.
Subplots in pandas data visualization allow for 3D plotting of data points.
Subplots in pandas data visualization enable the creation of multiple plots within the same figure, facilitating comparison and visualization of various aspects of the data.
What is the purpose of the title() method in pandas plots?
To set the title of the plot.
To add a legend to the plot.
To adjust the plot size.
To change the data type of the plot.
