Data visualization Flashcards

1
Q

import matplotlib as plt

A

import matplotlib.pyplot as plt

% matplotlib inline

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

Purpose of “%matplotlib inline”

A

It is a magic function that renders the figure in a notebook (instead of displaying a dump of the figure object).

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

What does Pandas dropna does?

A

Pandas dropna() method allows the user to analyze and drop Rows/Columns with Null values in different ways.

DataFrameName.dropna(axis=0, how=’any’, thresh=None, subset=None, inplace=False)

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

Show scatter plot of recent_grads.csv being x sample_size and y Median

A

recent_grads.plot(x=’Sample_size’, y=’Median’, kind=’scatter’)

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

Show a scatter plot of recent_grads.csv, x= Sample_size and y=Unemployment_rate

A

recent_grads.plot(x=’Sample_size’, y=’Unemployment_rate’, kind=’scatter’)

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

Show a scatter plot of recent_grads.csv, x= Full_time and y= Median

A

recent_grads.plot(x=’Full_time’, y=’Median’, kind=’scatter’)

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

Show a scatter plot of recent_grads, x=ShareWomen and y= Unemployment_rate

A

recent_grads.plot(x=’ShareWomen’, y=’Unemployment_rate’, kind=’scatter’)

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

Show a scatter plot of recent grads, x=Men and y= Median

A

recent_grads.plot(x=’Men’, y=’Median’, kind=’scatter’)

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

Show a scatter plot of recent grads, x= Women and y= Median

A

recent_grads.plot(x=’Women’, y=’Median’, kind=’scatter’)

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

Import scatter matrix

A

from pandas.plotting import scatter_matrix

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

Show scatter matrix plot from recent_grads using sample sixe and Median, with figsize of (6,6)

A

scatter_matrix(recent_grads[[‘Sample_size’, ‘Median’]], figsize=(6,6))

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

Show scatter matrix plot from recent_grads using sample size, median and Unemployment_rate, with figsize of (10,10)

A

scatter_matrix(recent_grads[[‘Sample_size’, ‘Median’, ‘Unemployment_rate’]], figsize=(10,10))

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

Show plot bars from the first 10 majors, x= Major and y = Sharewomen

A

recent_grads[:10].plot.bar(x=’Major’, y=’ShareWomen’, legend=False)

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