0
0
Pandasdata~10 mins

info() for column types and nulls 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 show the summary info of the DataFrame.

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

Complete the code to import pandas with the common alias.

Pandas
import [1] as pd
Drag options to blanks, or click blank then click option'
Anumpy
Bpandas
Cmatplotlib
Dseaborn
Attempts:
3 left
💡 Hint
Common Mistakes
Importing numpy instead of pandas
Using wrong alias
3fill in blank
hard

Fix the error in the code to show info of DataFrame named data.

Pandas
data.[1]
Drag options to blanks, or click blank then click option'
Ainfo()
Binfo[]
CInfo()
Dinfo
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting parentheses after info
Using wrong case or brackets
4fill in blank
hard

Fill both blanks to create a DataFrame and show its info.

Pandas
import pandas as [1]
df = [2].DataFrame({'A': [1, 2, None], 'B': ['x', 'y', 'z']})
df.info()
Drag options to blanks, or click blank then click option'
Apd
Bnp
Cpandas
Ddata
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for import and DataFrame
Using numpy alias instead of pandas
5fill in blank
hard

Fill all three blanks to create a DataFrame, add a column, and show info.

Pandas
import [1] as pd
df = pd.DataFrame({'col1': [1, 2, 3]})
df['[2]'] = [4, 5, 6]
df.[3]()
Drag options to blanks, or click blank then click option'
Apandas
Bnew_col
Cinfo
Dnumpy
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong import alias
Forgetting quotes around new column name
Not calling info() as a method