Muller Unlimited

View Original

January 9, 2020

Seaborn Review

  1. Ingest data from a csv file to Pandas DataFrame: df = read_csv(‘file.csv’)

  2. Set sns.barplot( ) with desired values for x, y, and set data equal to your DataFrame: sns.barplot(data = df, x = ‘x_values’, y = ‘y_values’)

  3. Set desired values for estimator and hue parameters: sns.barplot(data = df, x = ‘x_values’, y = ‘y_values, hue = ‘Value’, estimator = len)

  4. Render the plot using plt.show

KDE Plot - Kernal Density Estimator - shows a smoothed version of dataset.
sns.kdeplot( )

Box Plot - A classic statistical model that shows the median, interquartile range, and outliers.
sns.boxplot( )

Violin Plot - A combination of a KDE and box plot. It is good for showing multiple distributions at the same time.
sns.violinplot( )