Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Seaborn + Pandas | Nice to Meet you, seaborn!
First Dive into seaborn Visualization
course content

Contenido del Curso

First Dive into seaborn Visualization

First Dive into seaborn Visualization

1. Nice to Meet you, seaborn!
2. More and More Plots
3. Plot Customization

Seaborn + Pandas

What is the pandas?

  • Python library for data analysis;
  • Easily reads DataSets from csv, txt, and other types of files;
  • DataSets take the form of DataFrame objects.

When you read a dataset with the help of the pandas you create a DataFrame:

To initialize a countplot based on the pandas DataFrame, we need to input at least 2 parameters: x (the column whose values will be counted) and data (the DataFrame containing the data).

Look at the code below!

123456789101112131415
# Importing the Seaborn import seaborn as sns # Importing the matplotlib.pyplot import matplotlib.pyplot as plt # Importing the pandas 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/example3.csv') # Creating the countplot sns.countplot(x = 'food', data = df) # Showing the plot plt.show()
copy

Let's solve this problem!

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 1. Capítulo 4
toggle bottom row

Seaborn + Pandas

What is the pandas?

  • Python library for data analysis;
  • Easily reads DataSets from csv, txt, and other types of files;
  • DataSets take the form of DataFrame objects.

When you read a dataset with the help of the pandas you create a DataFrame:

To initialize a countplot based on the pandas DataFrame, we need to input at least 2 parameters: x (the column whose values will be counted) and data (the DataFrame containing the data).

Look at the code below!

123456789101112131415
# Importing the Seaborn import seaborn as sns # Importing the matplotlib.pyplot import matplotlib.pyplot as plt # Importing the pandas 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/example3.csv') # Creating the countplot sns.countplot(x = 'food', data = df) # Showing the plot plt.show()
copy

Let's solve this problem!

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 1. Capítulo 4
toggle bottom row

Seaborn + Pandas

What is the pandas?

  • Python library for data analysis;
  • Easily reads DataSets from csv, txt, and other types of files;
  • DataSets take the form of DataFrame objects.

When you read a dataset with the help of the pandas you create a DataFrame:

To initialize a countplot based on the pandas DataFrame, we need to input at least 2 parameters: x (the column whose values will be counted) and data (the DataFrame containing the data).

Look at the code below!

123456789101112131415
# Importing the Seaborn import seaborn as sns # Importing the matplotlib.pyplot import matplotlib.pyplot as plt # Importing the pandas 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/example3.csv') # Creating the countplot sns.countplot(x = 'food', data = df) # Showing the plot plt.show()
copy

Let's solve this problem!

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

What is the pandas?

  • Python library for data analysis;
  • Easily reads DataSets from csv, txt, and other types of files;
  • DataSets take the form of DataFrame objects.

When you read a dataset with the help of the pandas you create a DataFrame:

To initialize a countplot based on the pandas DataFrame, we need to input at least 2 parameters: x (the column whose values will be counted) and data (the DataFrame containing the data).

Look at the code below!

123456789101112131415
# Importing the Seaborn import seaborn as sns # Importing the matplotlib.pyplot import matplotlib.pyplot as plt # Importing the pandas 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/example3.csv') # Creating the countplot sns.countplot(x = 'food', data = df) # Showing the plot plt.show()
copy

Let's solve this problem!

Tarea

  1. Import the seaborn with the sns alias.
  2. Import the matplotlib.pyplot with the plt alias.
  3. Import the pandas with the pd alias.
  4. Read the file using df variable.
  5. Create the x-oriented countplot using the 'Bamboo' column in the plot function.
  6. Show the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 1. Capítulo 4
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt