0
0
Pandasdata~10 mins

describe() for statistical summary in Pandas - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get a statistical summary of the DataFrame.

Pandas
summary = df.[1]()
Drag options to blanks, or click blank then click option'
Ainfo
Btail
Chead
Ddescribe
Attempts:
3 left
💡 Hint
Common Mistakes
Using info() instead of describe() which shows data types, not statistics.
Using head() or tail() which show rows, not statistics.
2fill in blank
medium

Complete the code to include all columns (numeric and non-numeric) in the summary.

Pandas
summary = df.describe(include=[1])
Drag options to blanks, or click blank then click option'
A'numeric'
B'all'
C'object'
D'category'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'numeric' which is the default and excludes text columns.
Using 'object' or 'category' which only include specific types.
3fill in blank
hard

Fix the error in the code to get the summary of a DataFrame named data.

Pandas
summary = data.[1]()
Drag options to blanks, or click blank then click option'
Adescribe
Bsummary
Cdescribe_summary
Dsummarize
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-existent method names like summarize or summary.
Confusing method names with variable names.
4fill in blank
hard

Fill both blanks to create a summary that includes only categorical columns.

Pandas
summary = df.describe(include=[1], exclude=[2])
Drag options to blanks, or click blank then click option'
A'object'
B'number'
C'float64'
D'int64'
Attempts:
3 left
💡 Hint
Common Mistakes
Including numeric types which adds numbers to the summary.
Excluding object type which removes categorical columns.
5fill in blank
hard

Fill all three blanks to create a summary showing only columns of type float64.

Pandas
summary = df.describe(include=[1], exclude=[2], percentiles=[[3]])
Drag options to blanks, or click blank then click option'
A'float64'
B'int64'
C0.5
D0.25
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong types in include or exclude.
Setting percentiles to values outside 0 to 1 range.