What is Seaborn?
A powerful and easy-to-use Python data visualization library built on Matplotlib.
What is the typical coding environment used in this course?
Jupyter Notebook (or just notebooks).
How do you import Seaborn?
import seaborn as sns
How do you load a CSV file into a pandas DataFrame?
pd.read_csv(filepath
What are comments in Python?
Lines preceded by a # symbol
How do you view the first 5 rows of a DataFrame?
data.head()
How do you create a line chart with Seaborn?
sns.lineplot(data=dataframe)
What does the index_col parameter do in pd.read_csv?
Sets the specified column as the row index.
How do you set the figure size in Matplotlib?
plt.figure(figsize=(width
How do you add a title to a plot?
plt.title(“Your Title”)
How do you plot only one column from a DataFrame?
sns.lineplot(data=dataframe[“ColumnName”])
How do you create a bar chart in Seaborn?
sns.barplot(x=x_data
How do you create a heatmap in Seaborn?
sns.heatmap(data=dataframe
What is a scatter plot used for?
To show the relationship between two continuous variables.
How do you create a scatter plot with Seaborn?
sns.scatterplot(x=df[‘col1’]
How do you add a regression line to a scatter plot?
sns.regplot(x=df[‘col1’]
How do you color-code points in a scatter plot by a third variable?
Add hue=df[‘category’] to sns.scatterplot().
What is a KDE plot?
Kernel Density Estimate plot — a smoothed histogram showing distribution.
How do you create a KDE plot?
sns.kdeplot(data=df[‘column’]
What is a joint plot in Seaborn?
A 2D KDE plot with marginal KDE plots for each variable.
How do you change the Seaborn theme?
sns.set_style(“theme_name”) — e.g.
What are the three broad categories of chart types?
Trends
Which chart is best for showing trends over time?
Line chart.
Which chart is best for comparing quantities across groups?
Bar chart.