Q1easyWhat will be the output of this code?A[1, 2, 3, 1, 2, 3]BErrorC[1, 2, 3, 2, 4, 6]D[2, 4, 6]Check AnswerReveal Answer & ExplanationDiscuss on Board
Q2easyWhat will be the output of the following code?A1B2C3D6Check AnswerReveal Answer & ExplanationDiscuss on Board
Q3easyWhat is the result of the following Pandas operation?A1B3C10D[1, 2]Check AnswerReveal Answer & ExplanationDiscuss on Board
Q4easyWhat is a Pandas GroupBy operation used for?ASorting rows alphabetically.BDeleting rows.CSplitting the data into groups, applying a function (like mean/sum) to each group, and combining the results.DMerging two different CSV files.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q5mediumWhat does the axis=1 parameter represent in a Pandas function (like drop or apply)? AColumnsBRowsCThe diagonal valuesDThe index of the tableCheck AnswerReveal Answer & ExplanationDiscuss on Board
Q6easyWhat is the function of the read_csv() function in Pandas?ATo format the console output.BTo parse a comma-separated values file into a DataFrame object.CTo save a DataFrame to a file.DTo connect to a SQL database.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q7easyWhat does df.head(3) return?AThe last 3 rows of the DataFrame.BThe column names of the first 3 columns.CA random sample of 3 rows.DThe first 3 rows of the DataFrame.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q8easyWhat is the difference between df.loc[0] and df.iloc[0]?Aloc is slower.BThey are exactly the same.Cloc is for columns; iloc is for rows.Dloc searches for an index label named '0'; iloc retrieves the row at integer position 0.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q9mediumWhy is it significantly faster to use Pandas df['score'] * 2 compared to writing a for loop to iterate through the column?AIt uses less memory.BIt automatically sorts the data.CPandas uses vectorized operations (implemented in C) that bypass Python's slow loop interpreter.DIt prevents data loss.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q10mediumYour data contains several NaN values. Which method is used to replace all missing values with the mean of the column?Adf.fillna(df.mean())Bdf.replace_mean()Cdf.drop_na()Ddf.mean().fillna()Check AnswerReveal Answer & ExplanationDiscuss on Board