<jupyter_start><jupyter_text>- Built on the top of matplotlib- Works well with pandas dataframe<jupyter_code>import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = sns.load_dataset('iris')
df.head()<jupyter_output><empty_output><jupyter_text>Univariated Analysis- One variable Histogram<jupyter_code>sns.histplot(data=df,x='petal_length',bins=20,hue='species')
ax = plt.twinx()
sns.kdeplot(data = df,x='petal_length',ax=ax,hue='species')
plt.plot()<jupyter_output><empty_output><jupyter_text>**Observation**- No flower having petal length b/t 2.2 - 2.9- bimodal distribution<jupyter_code>setosa = df[df.species == 'setosa']
versicolor = df[df.species == 'versicolor']
virginica = df[df.species == 'virginica']

sns.kdeplot(data = setosa,x='petal_length',label='setosa')
sns.kdeplot(data = versicolor,x='petal_length')
sns.kdeplot(data = virginica,x='petal_length')
sns.kdeplot(data=df,x='petal_length',hue='species')

sns.displot(data=df,x='petal_length',hue='species')<jupyter_output><empty_output><jupyter_text>Bivariate Analysis<jupyter_code>sns.scatterplot(data=df,x='petal_length',y='petal_width',hue='species')
# Joint Plot
sns.jointplot(data=df,x='sepal_length',y='sepal_width',kind='reg')
sns.jointplot(data=df,x='petal_width',y='petal_length',kind='scatter',hue='species')<jupyter_output><empty_output><jupyter_text>HexplotGood if there is a high conc. of data points in a region<jupyter_code>sns.jointplot(data=df,x='sepal_length',y='sepal_width',kind='hex')<jupyter_output><empty_output><jupyter_text>Multivariate Analysis Pairplot<jupyter_code>sns.pairplot(data=df)
sns.pairplot(data=df,hue='species')<jupyter_output><empty_output><jupyter_text>- Which two features can separate the category-wise data points very clearly? -- petal width-- petal length<jupyter_code># countplot
sns.countplot(data=df,x='species')
sns.boxplot(data=df,y='sepal_width',x='species')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1551901336073998, 'fraction_numerical': 0.003083247687564234, 'mean_word_length': 11.245283018867925, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '221159', 'license': 'MIT', 'n_tokens_mistral': 789, 'n_tokens_neox': 757, 'n_words': 103, 'path': 'Advanced/seaborn.ipynb', 'repo_name': 'yesdeepakmittal/PY_training', 'size': '1946'}