NEW
Font size
WorksheetsData Preprocessing
Total questions: 40
Worksheet time: 40mins
What is the formula for IQR?
Q3 − Q1
Q1 − Q3
Q2 − Q1
Q3 − Q2
If Q1 = 10 and Q3 = 30, what is IQR?
10
20
40
15
Which rule is commonly used with IQR to detect outliers?
±1.5 * IQR
±2 * IQR
±3 * IQR
±0.5 * IQR
If a value lies below Q1 − 1.5*IQR, it is considered:
Normal data
Outlier
Median
Missing value
Which library provides a direct function to compute IQR?
NumPy
Scipy (iqr())
Matplotlib
Pandas
Which visualization best identifies IQR-based outliers?
Scatter plot
Boxplot
Line plot
Histogram
IQR is resistant to:
Outliers
Mean shift
Scaling
Skewness
Why is IQR preferred over range?
Uses only extremes
Not affected by outliers
Easier to compute
Gives mean
Which of the following is NOT a method of handling missing values?
Deletion
Imputation
Interpolation
Overfitting
What does df.dropna() do in Pandas?
Replaces NaN with 0
Removes rows with NaN
Removes columns only
Fills with mean
Which method is better for categorical missing data?
Mode imputation
Mean imputation
Median imputation
Min-max scaling
Outlier treatment by replacing extreme values with thresholds is called:
Winsorization
Standardization
Normalization
Transformation
If numeric data has extreme skewness, which transformation works best?
Log
Square
Cube
Exponential
Which function replaces inappropriate values in Pandas?
df.fillna()
df.replace()
df.dropna()
df.fill()
Which method is best for handling inconsistent categorical data (‘male’, ‘Male’, ‘M’)?
Lowercasing + Mapping
Drop data
Random replacement
One-hot encoding directly
Which type of inappropriate data is best handled with regex replacement?
Missing values
Outliers
Textual noise (special chars, typos)
Duplicate rows
Which function standardizes column names?
df.rename()
df.label()
df.columns_update()
df.fixnames()
Which Pandas function removes duplicate rows?
df.remove_duplicates()
df.drop_duplicates()
df.clean_duplicates()
df.unique()
Which Pandas method fills missing values using forward propagation?
df.fillna(method='ffill')
df.fillna(method='bfill')
df.interpolate()
df.dropna()
To normalize a column between 0 and 1 using Pandas:
(df - df.min())/(df.max()-df.min())
df/df.mean()
df/df.std()
None
Which method is used to detect null values in Pandas?
df.isnull()
df.null()
df.isnan()
df.na()
Which Pandas method helps to bin continuous values?
pd.cut()
pd.bin()
pd.groupby()
pd.discretize()
Which function detects outliers using Z-score in Pandas (with NumPy)?
(df-mean)/std
df.describe()
df.skew()
df.corr()
Which method is used to apply custom preprocessing functions row-wise?
df.map()
df.apply()
df.applymap()
df.transform()
Which Scikit-learn class standardizes features?
MinMaxScaler
StandardScaler
Normalizer
LabelEncoder
Which class normalizes each row vector to unit length?
Normalizer
StandardScaler
PCA
RobustScaler
Which encoder is best for nominal categorical features?
OneHotEncoder
LabelEncoder
OrdinalEncoder
StandardScaler
Which method handles outliers better during scaling?
RobustScaler
MinMaxScaler
StandardScaler
Normalizer
Which function splits dataset into training and testing in sklearn?
train_test_split()
split_train_test()
dataset_split()
sklearn.split()
Which module provides preprocessing utilities?
sklearn.preprocessing
sklearn.data
sklearn.utils
sklearn.cleaning
Which imputer replaces missing values with mean, median, or most_frequent?
SimpleImputer
KNNImputer
RobustImputer
None
Which sklearn method is used for dimensionality reduction?
PCA
MinMaxScaler
Imputer
LabelEncoder
Which plot best shows distribution of a variable?
Line plot
Histogram
Scatter
Bar
Which plot is most useful for detecting outliers?
Histogram
Boxplot
Pie chart
Heatmap
Which function in Seaborn creates pairwise plots?
sns.pairplot()
sns.scatter()
sns.jointplot()
sns.gridplot()
Which Seaborn plot is used for categorical vs numerical data?
sns.barplot()
sns.scatterplot()
sns.histplot()
sns.kdeplot()
Which function in Seaborn shows correlation heatmap?
sns.heatmap(df.corr())
sns.corrplot()
sns.matrixplot()
sns.colorplot()
Which plot shows density distribution?
Histogram
KDE Plot
Boxplot
Bar plot
Which argument in Seaborn controls color theme?
palette
color
style
theme
Which function in Matplotlib displays multiple subplots?
plt.subplot()
plt.multiplot()
plt.grid()
plt.subgraph()
