0
0
Data Analysis Pythondata~10 mins

Pair plots for feature relationships in Data Analysis Python - 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 the seaborn library as sns.

Data Analysis Python
import [1] as sns
Drag options to blanks, or click blank then click option'
Aseaborn
Bmatplotlib
Cpandas
Dnumpy
Attempts:
3 left
💡 Hint
Common Mistakes
Importing matplotlib as sns
Importing pandas as sns
Importing numpy as sns
2fill in blank
medium

Complete the code to load the 'iris' dataset using seaborn.

Data Analysis Python
data = sns.[1]('iris')
Drag options to blanks, or click blank then click option'
Aload_iris
Bread_csv
Cload_dataset
Dget_data
Attempts:
3 left
💡 Hint
Common Mistakes
Using read_csv which is a pandas function
Using load_iris which is from sklearn
Using get_data which is not a seaborn function
3fill in blank
hard

Fix the error in the code to create a pair plot of the data.

Data Analysis Python
sns.pairplot(data=[1])
plt.show()
Drag options to blanks, or click blank then click option'
Adata
Bdataset
Cdf
Diris
Attempts:
3 left
💡 Hint
Common Mistakes
Passing 'iris' instead of the variable data
Passing undefined variables like df or dataset
4fill in blank
hard

Fill both blanks to create a pair plot showing only numeric features and coloring by species.

Data Analysis Python
sns.pairplot(data=[1], hue=[2])
plt.show()
Drag options to blanks, or click blank then click option'
Adata
B'species'
C'class'
Diris
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'class' instead of 'species' for hue
Passing the dataset as a string instead of variable
5fill in blank
hard

Fill all three blanks to create a pair plot with markers for each species and limited variables.

Data Analysis Python
sns.pairplot(data=[1], vars=[2], hue=[3], markers=['o', 's', '^'])
plt.show()
Drag options to blanks, or click blank then click option'
Adata
B['sepal_length', 'sepal_width', 'petal_length']
C'species'
D'variety'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'variety' instead of 'species' for hue
Passing vars as a string instead of a list
Using an undefined variable instead of data