Which method gives a quick overview of the DataFrame including non-null counts and data types?
A
df.summary() B
df.describe() C
df.info() D
df.scan()
Analysis & Theory
`df.info()` provides a summary of the DataFrame including index, column names, non-null counts, and data types.
Which method returns basic statistics for numeric columns like mean and std?
A
df.summary() B
df.describe() C
df.stat() D
df.stats()
Analysis & Theory
`df.describe()` returns count, mean, std, min, max, and quartiles for numeric columns.
What does `df.head(3)` do?
A
Returns the last 3 rows B
Returns 3 random rows C
Returns the first 3 rows D
Returns the column names
Analysis & Theory
`df.head(n)` returns the first `n` rows of the DataFrame. Default is 5 if no argument is given.
Which method returns the number of rows and columns as a tuple?
A
df.size B
df.count() C
df.shape D
df.form
Analysis & Theory
`df.shape` returns a tuple like (rows, columns).
How do you get the count of unique values in a Series?
A
df.value_counts() B
df.count_unique() C
df.unique() D
df.nunique()
Analysis & Theory
`value_counts()` counts the frequency of each unique value in a Series.
What does `df['column'].mean()` return?
A
Median value of the column B
Sum of all values C
Average of the column D
Standard deviation
Analysis & Theory
`.mean()` computes the average of numeric values in a column.
Which method returns the maximum value in a column?
A
df['col'].max() B
df['col'].maximum() C
df.maxvalue('col') D
df['col'].top()
Analysis & Theory
`max()` returns the maximum value in a Series or column.
What does `df['col'].min()` do?
A
Returns column name B
Returns minimum value in column C
Returns number of missing values D
Returns first value
Analysis & Theory
`min()` returns the smallest value in the specified column.
Which method gives the number of non-null values in each column?
A
df.non_null() B
df.count() C
df.length() D
df.valid()
Analysis & Theory
`count()` returns the count of non-null (non-missing) values per column.
How can you find the correlation between numeric columns?
A
df.stats() B
df.describe() C
df.relate() D
df.corr()
Analysis & Theory
`corr()` computes the pairwise correlation between numeric columns.