Data visualization Flashcards

(37 cards)

1
Q

What is Seaborn?

A

A powerful and easy-to-use Python data visualization library built on Matplotlib.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the typical coding environment used in this course?

A

Jupyter Notebook (or just notebooks).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you import Seaborn?

A

import seaborn as sns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you load a CSV file into a pandas DataFrame?

A

pd.read_csv(filepath

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are comments in Python?

A

Lines preceded by a # symbol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you view the first 5 rows of a DataFrame?

A

data.head()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you create a line chart with Seaborn?

A

sns.lineplot(data=dataframe)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the index_col parameter do in pd.read_csv?

A

Sets the specified column as the row index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you set the figure size in Matplotlib?

A

plt.figure(figsize=(width

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you add a title to a plot?

A

plt.title(“Your Title”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you plot only one column from a DataFrame?

A

sns.lineplot(data=dataframe[“ColumnName”])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you create a bar chart in Seaborn?

A

sns.barplot(x=x_data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you create a heatmap in Seaborn?

A

sns.heatmap(data=dataframe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a scatter plot used for?

A

To show the relationship between two continuous variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you create a scatter plot with Seaborn?

A

sns.scatterplot(x=df[‘col1’]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you add a regression line to a scatter plot?

A

sns.regplot(x=df[‘col1’]

17
Q

How do you color-code points in a scatter plot by a third variable?

A

Add hue=df[‘category’] to sns.scatterplot().

18
Q

What is a KDE plot?

A

Kernel Density Estimate plot — a smoothed histogram showing distribution.

19
Q

How do you create a KDE plot?

A

sns.kdeplot(data=df[‘column’]

20
Q

What is a joint plot in Seaborn?

A

A 2D KDE plot with marginal KDE plots for each variable.

21
Q

How do you change the Seaborn theme?

A

sns.set_style(“theme_name”) — e.g.

22
Q

What are the three broad categories of chart types?

23
Q

Which chart is best for showing trends over time?

24
Q

Which chart is best for comparing quantities across groups?

25
How do you view the last 5 rows of a DataFrame?
data.tail()
26
What does NaN stand for?
Not a Number — represents missing or undefined data.
27
How do you load data with a date index?
pd.read_csv(...
28
What is the purpose of the hue parameter in Seaborn?
To split data into different groups/colors based on a categorical variable.
29
Where can you find public datasets to practice with?
Kaggle Datasets (kaggle.com/datasets).
30
How do you start a new Kaggle notebook?
Go to kaggle.com/code and click "+ New Notebook".
31
What libraries are typically imported for data visualization with Seaborn?
pandas
32
What command shows all column names in a DataFrame?
dataframe.columns
33
What type of file is commonly used for tabular data in this course?
CSV (Comma-Separated Values).
34
How do you check your code in the exercises?
step_x.check()
35
How do you get a hint in the exercises?
step_x.hint()
36
How do you see the solution in the exercises?
step_x.solution()
37
What is the role of pd.plotting.register_matplotlib_converter()?
Ensures proper handling of datetime objects in plots.