Data Science · SQL for Data Analysis What does the DISTINCT keyword do in a SELECT list? A Keeps only rows with NULLs B Removes duplicate result rows Correct answer C Sorts the result rows D Counts repeated rows MCQSEXAM Show answer Read explanation
Data Science · SQL for Data Analysis What does a LEFT JOIN produce for a left row with no match? A The right row with NULLs on the left B Nothing; the row is dropped C The left row with NULLs on the right Correct answer D Only rows that found a match MCQSEXAM Show answer Read explanation
Data Science · SQL for Data Analysis What does COUNT(column) exclude that COUNT(*) includes? A Rows where the column is NULL Correct answer B Rows that duplicate earlier ones C Rows rejected by the WHERE clause D Rows whose value is zero MCQSEXAM Show answer Read explanation
Data Science · SQL for Data Analysis How does the WHERE clause differ from HAVING? A WHERE may test aggregate values B WHERE is applied after ORDER BY C WHERE filters rows before grouping Correct answer D WHERE filters groups after grouping MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn What does feature_importances_ of a fitted random forest express? A Number of trees using a feature B Statistical p-value of each feature C Original scale of each feature D Relative contribution of each feature Correct answer MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn Which range does MinMaxScaler map features to by default? A Minus one to zero B Zero to one Correct answer C Minus one to one D Zero to a hundred MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn What does the score method of a fitted classifier return by default? A The count of support vectors B The tuned hyperparameters C Mean accuracy on the passed data Correct answer D The training time in seconds MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn Which of these classifiers does not provide a predict_proba method? A GaussianNB B LinearSVC Correct answer C LogisticRegression D RandomForestClassifier MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn Which transformer converts string class labels into integers? A StandardScaler B SimpleImputer C LabelEncoder Correct answer D OneHotEncoder MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn What does accuracy_score measure for a classifier? A Mean squared difference from truth B Share of predictions that are correct Correct answer C Average of the predicted probabilities D Area under the ROC curve MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn With refit=True, what does GridSearchCV do after evaluating every candidate? A Recomputes the metric on the grid mean B Refits the best estimator on all data Correct answer C Repeats the search over a wider grid D Keeps every fold model for later use MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn What does cross_val_score return by default? A The mean score only B The fitted estimators C A confusion matrix per fold D One score for each fold Correct answer MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn Why is a Pipeline preferred to scaling the whole dataset before splitting? A It picks the algorithm for the user B It refits the scaler inside each fold Correct answer C It runs the model on a GPU faster D It removes the need for a test set MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn What does StandardScaler do to each feature column? A Scales it into the range 0 to 1 B Removes its constant values C Encodes it as dummy columns D Centres it to mean 0, variance 1 Correct answer MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn Does train_test_split shuffle the data by default? A No, the original order is kept B Only when random_state is given C Only for regression targets D Yes, shuffle defaults to True Correct answer MCQSEXAM Show answer Read explanation
Data Science · Scikit-learn A call such as model.fit(X, y).predict(X) works in scikit-learn because fit returns: A the training accuracy as a floating-point value B the estimator itself, so that calls can be chained Correct answer C a fitted copy, leaving the original unchanged D a dictionary of the learned parameters MCQSEXAM Show answer Read explanation
Data Science · Pandas Which columns does df.describe() summarise by default? A Only columns free of NaN B Only the numeric columns Correct answer C Every column including text D Only the index entries MCQSEXAM Show answer Read explanation
Data Science · Pandas How does qcut differ from cut? A qcut only handles datetime data B cut always makes equal-size bins C qcut bins by quantile; cut by values Correct answer D qcut bins by value; cut by quantile MCQSEXAM Show answer Read explanation
Data Science · Pandas What does df.drop(columns=['a'], inplace=True) return? A Null B True C False D None Correct answer MCQSEXAM Show answer Read explanation
Data Science · Pandas Which aggregation does pivot_table apply when aggfunc is omitted? A The sum B The count C The maximum D The mean Correct answer MCQSEXAM Show answer Read explanation
Data Science · Pandas What does df.sort_values(by='x', ascending=False) do? A Ranks x without reordering rows B Sorts rows by x, largest first Correct answer C Sorts columns by x, largest first D Drops rows where x is negative MCQSEXAM Show answer Read explanation
Data Science · Pandas What distinguishes pd.concat from DataFrame.merge? A concat joins frames on shared keys B merge stacks frames along an axis C merge needs identical column names D concat stacks frames along an axis Correct answer MCQSEXAM Show answer Read explanation
Data Science · Pandas Why is chained assignment such as df[df.a > 0]['b'] = 1 unreliable? A It reorders the index of the frame B The inner selection may be a copy Correct answer C It always raises a KeyError D It silently converts dtypes to object MCQSEXAM Show answer Read explanation
Data Science · Pandas In df.apply(func, axis=1), what does func receive on each call? A One row as a Series Correct answer B One column as a Series C The whole DataFrame D A single scalar cell MCQSEXAM Show answer Read explanation
Data Science · Pandas How are the results of value_counts() ordered by default? A By count, lowest first B By the index labels C By original row order D By count, highest first Correct answer MCQSEXAM Show answer Read explanation