Conteúdo do Curso
First Dive into seaborn Visualization
First Dive into seaborn Visualization
Lineplot
An example of a lineplot:
To initialize a line plot based on the pandas
DataFrame, we need to input at least 3 parameters: x
and y
(columns-coordinates for the plot) and data
(the DataFrame containing the data).
Look at the code below!
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example4.csv') # Creating the lineplot sns.lineplot(x = 'x', y = 'y', data = df) # Showing the plot plt.show()
Let's solve this problem!
Swipe to show code editor
-
Import the
seaborn
withsns
alias. -
Import the
matplotlib.pyplot
withplt
alias. -
Import the
pandas
withpd
alias. -
Read the file.
-
Create a lineplot using
'time'
column for the x-value and'level'
column for the y-value. -
Show the plot.
Obrigado pelo seu feedback!
Lineplot
An example of a lineplot:
To initialize a line plot based on the pandas
DataFrame, we need to input at least 3 parameters: x
and y
(columns-coordinates for the plot) and data
(the DataFrame containing the data).
Look at the code below!
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example4.csv') # Creating the lineplot sns.lineplot(x = 'x', y = 'y', data = df) # Showing the plot plt.show()
Let's solve this problem!
Swipe to show code editor
-
Import the
seaborn
withsns
alias. -
Import the
matplotlib.pyplot
withplt
alias. -
Import the
pandas
withpd
alias. -
Read the file.
-
Create a lineplot using
'time'
column for the x-value and'level'
column for the y-value. -
Show the plot.
Obrigado pelo seu feedback!
Lineplot
An example of a lineplot:
To initialize a line plot based on the pandas
DataFrame, we need to input at least 3 parameters: x
and y
(columns-coordinates for the plot) and data
(the DataFrame containing the data).
Look at the code below!
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example4.csv') # Creating the lineplot sns.lineplot(x = 'x', y = 'y', data = df) # Showing the plot plt.show()
Let's solve this problem!
Swipe to show code editor
-
Import the
seaborn
withsns
alias. -
Import the
matplotlib.pyplot
withplt
alias. -
Import the
pandas
withpd
alias. -
Read the file.
-
Create a lineplot using
'time'
column for the x-value and'level'
column for the y-value. -
Show the plot.
Obrigado pelo seu feedback!
An example of a lineplot:
To initialize a line plot based on the pandas
DataFrame, we need to input at least 3 parameters: x
and y
(columns-coordinates for the plot) and data
(the DataFrame containing the data).
Look at the code below!
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example4.csv') # Creating the lineplot sns.lineplot(x = 'x', y = 'y', data = df) # Showing the plot plt.show()
Let's solve this problem!
Swipe to show code editor
-
Import the
seaborn
withsns
alias. -
Import the
matplotlib.pyplot
withplt
alias. -
Import the
pandas
withpd
alias. -
Read the file.
-
Create a lineplot using
'time'
column for the x-value and'level'
column for the y-value. -
Show the plot.