ECDF Plot in Seaborn

Machine Learning courses with 100+ Real-time projects Start Now!!

Program 1

Seaborn Dataset

# ecdf= Empirical Cumulative Distribution Function plot 


import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns



df_value=pd.read_csv("D://scikit_data/Billing/data.csv")
df_value


sns.set_style('darkgrid')
sns.ecdfplot(x='value',data=df_value)


df_tips=pd.read_csv("D://scikit_data/Billing/tips.csv")
df_tips


df_tips['tip'].head()

sns.ecdfplot(x='tip',data=df_tips)


df_tips.tip.max()


df_tips.tip.min()


sns.ecdfplot(x='tip',data=df_tips)
plt.axvline(4,c='black')


df_tips


sns.ecdfplot(x='tip',data=df_tips,hue='time')


sns.ecdfplot(x='tip',data=df_tips,hue='sex')


p=sns.ecdfplot(x='tip',data=df_tips,hue='day')


sns.ecdfplot(x='tip',data=df_tips,hue='day',lw=3)


p=sns.ecdfplot(x='tip',data=df_tips,hue='day')
p.legend(['Tursday','Friday','Saturday','Sunday'],title='Days of Week', loc=4)

 

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *