Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Ecdfplot | Distributions of Data
Deep Dive into the seaborn Visualization

book
Ecdfplot

An ecdfplot represents the proportion or count of observations falling below each unique value in a dataset. Compared to a histogram or density plot, it has the advantage that each observation is visualized directly, meaning that no binning or smoothing parameters need to be adjusted.

carousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-img
Tarefa

Swipe to start coding

  1. Create the ecdfplot using the seaborn library:
  • Set the x parameter equals the bill_length_mm;
  • Set the hue parameter equals the 'island';
  • Add the complementary parameter;
  • Set the stat parameter equals the 'count';
  • Set the palette equals the 'mako';
  • Set the data.

Solução

import warnings

# Ignore all warnings
warnings.filterwarnings('ignore')

# Importing libraries needed
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

# Reading the file
df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/66ba0c8e-8422-413c-b7e1-74bd24c61656/penguins.csv')

# Create a ecdfplot
sns.ecdfplot(# Set the x
x = 'bill_length_mm',
# Set the hue
hue = 'island',
# Set the complementary
complementary = True,
# Set the stat
stat = 'count',
# Set the palette
palette = 'mako',
# Set the data
data = df)
# Displaying the plot
plt.show()

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 4
import warnings

# Ignore all warnings
warnings.filterwarnings('ignore')

# Importing libraries needed
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

# Reading the file
df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/66ba0c8e-8422-413c-b7e1-74bd24c61656/penguins.csv')

# Create a ecdfplot
___(# Set the x
___,
# Set the hue
___,
# Set the complementary
complementary = ___,
# Set the stat
stat = ___,
# Set the palette
___,
# Set the data
___)
# Displaying the plot
plt.show()

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt