Which of the following statements are TRUE with respect to data handling uisng Pandas?
(A) A Series is a one-dimensional array containing a sequence of values.
(B) DF = DF.drop(['Samridhi','Ramit','Riya'], axis=1) will delete the columns having labels 'Samridhi', 'Ramit' and 'Riya'.
(C) DataFrame.loc[ ] is used for label based indexing of rows in DataFrames.
(D) Pandas.DataFrame.append() method is used to merge two DataFrames.
Which of the following statements are TRUE with respect to data handling uisng Pandas?
(A) A Series is a one-dimensional array containing a sequence of values.
(B) DF = DF.drop(['Samridhi','Ramit','Riya'], axis=1) will delete the columns having labels 'Samridhi', 'Ramit' and 'Riya'.
(C) DataFrame.loc[ ] is used for label based indexing of rows in DataFrames.
(D) Pandas.DataFrame.append() method is used to merge two DataFrames.
Solution
All four statements are true.
(A) A Series is a one-dimensional labelled array that holds a sequence of values.
(B) In drop(), axis=1 means columns, so the call removes the columns labelled 'Samridhi', 'Ramit' and 'Riya'. Assigning the result back to DF keeps the change.
(C) DataFrame.loc[ ] selects rows (and columns) by label, while iloc[ ] uses integer position.
(D) DataFrame.append() joins the rows of one DataFrame to another, which is how the syllabus describes merging two DataFrames.
Statement (D) can look false because append() was deprecated and later removed in newer pandas versions (pd.concat() replaces it). The syllabus still treats it as a valid method, so (D) is counted as true.
Related questions:
2026: 18 May Shift 2
2026: 18 May Shift 2
2025: 20 May Shift 1
2026: 29 May Shift 2
2026: 11 May Shift 2