Research breakthrough possible @S-Logix pro@slogix.in

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to create density plot using seaborn library in python?

Description

To create density plot for X variable using python.

Process

   Import seaborn library.

   Read the data set.

   Put the density plot.

Sample Code

#import library functions

import seaborn as sns

import pandas as pd

#Read the data set

data=pd.read_csv(‘/home/soft27/soft27/

Sathish/Pythonfiles/Employee.csv’)

#create data frame

df=pd.DataFrame(data)

print(“Data from the CSV file is\n”,df)

#density plot

sns.distplot(df[‘salary’], hist = False, kde = True,

kde_kws = {‘linewidth’: 3},label = df[‘name’])

Screenshots
create density plot using seaborn library in python
Read the data set