0
0
Pandasdata~10 mins

Importing Pandas conventions - Interactive Code Practice

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

Complete the code to import pandas with the common alias.

Pandas
import pandas as [1]
Drag options to blanks, or click blank then click option'
Apd
Bpn
Cps
Dpa
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pn' or 'ps' which are not standard aliases.
Not using an alias at all.
2fill in blank
medium

Complete the code to import only the DataFrame class from pandas.

Pandas
from pandas import [1]
Drag options to blanks, or click blank then click option'
ADataFrame
BSeries
CPanel
DIndex
Attempts:
3 left
💡 Hint
Common Mistakes
Importing Series instead of DataFrame.
Importing Panel which is deprecated.
3fill in blank
hard

Fix the error in the import statement to use the common pandas alias.

Pandas
import pandas as [1]
Drag options to blanks, or click blank then click option'
Apandas
Bpnd
Cpd
Dpan
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pandas' as alias which is redundant.
Using uncommon aliases like 'pan' or 'pnd'.
4fill in blank
hard

Fill both blanks to import pandas and create a DataFrame using the alias.

Pandas
[1] as pd

df = pd.[2]({'A': [1, 2], 'B': [3, 4]})
Drag options to blanks, or click blank then click option'
Aimport pandas
Bfrom pandas import DataFrame
CDataFrame
Dread_csv
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'from pandas import DataFrame' but then calling pd.DataFrame.
Using 'read_csv' instead of 'DataFrame' to create the DataFrame.
5fill in blank
hard

Fill all three blanks to import pandas, create a Series, and print it.

Pandas
[1] as pd

s = pd.[2]([10, 20, 30])

print([3])
Drag options to blanks, or click blank then click option'
Aimport pandas
BSeries
Cs
DDataFrame
Attempts:
3 left
💡 Hint
Common Mistakes
Using DataFrame instead of Series to create s.
Printing pd.Series instead of the variable s.