Practicing Machine Learning Interview Questions in Python
Lisa Stuart
Data Scientist


.dropna(axis=0).dropna(axis=1)SimpleImputer(strategy='constant', fill_value=0)SimpleImputer(strategy='mean')SimpleImputer(strategy='median')SimpleImputer(strategy='most_frequent')IterativeImputer()| Function | returns |
|---|---|
df.isna().sum() |
number missing |
df['feature'].mean() |
feature mean |
.shape |
row, column dimensions |
df.columns |
column names |
.fillna(0) |
fills missing with 0 |
select_dtypes(include = [np.number] ) |
numeric columns |
select_dtypes(include = ['object'] ) |
string columns |
.fit_transform(numeric_cols) |
fits and transforms |
What are the effects of missing values in a Machine Learning (ML) setting? Select the answer that is true:
sklearn's algorithms can handle them. What are the effects of missing values in a Machine Learning (ML) setting? The correct answer is:
What are the effects of missing values in a Machine Learning (ML) setting?
sklearn's algorithms cannot handle missing values and will throw an error.) Practicing Machine Learning Interview Questions in Python