Code Monkey home page Code Monkey logo

exno2ds's Introduction

EXNO2DS

AIM:

  To perform Exploratory Data Analysis on the given data set.

EXPLANATION:

The primary aim with exploratory analysis is to examine the data for distribution, outliers and anomalies to direct specific testing of your hypothesis.

ALGORITHM:

STEP 1: Import the required packages to perform Data Cleansing,Removing Outliers and Exploratory Data Analysis.

STEP 2: Replace the null value using any one of the method from mode,median and mean based on the dataset available.

STEP 3: Use boxplot method to analyze the outliers of the given dataset.

STEP 4: Remove the outliers using Inter Quantile Range method.

STEP 5: Use Countplot method to analyze in a graphical method for categorical data.

STEP 6: Use displot method to represent the univariate distribution of data.

STEP 7: Use cross tabulation method to quantitatively analyze the relationship between multiple variables.

STEP 8: Use heatmap method of representation to show relationships between two variables, one plotted on each axis.

CODING AND OUTPUT

import pandas as pd
import numpy as  np
import matplotlib.pyplot as plt
import seaborn as sns
dt=pd.read_csv("/content/titanic_dataset.csv")
dt

image

dt.info()

image

dt.describe()

image

dt.shape

image

dt.nunique()

image

dt["Survived"].value_counts()

image

per=(dt["Survived"].value_counts()/dt.shape[0]*100).round(2)
per

image

sns.countplot(data=dt,x="Survived")

image

dt

image

dt.Pclass.unique()

image

dt.rename(columns = {'Sex':'Gender'},inplace = True)
dt

image

sns.catplot(x="Gender",col="Survived",kind="count",data=dt,height=5,aspect=.7)

image

sns.catplot(x='Survived',hue="Gender",data=dt,kind = "count")

image

dt.boxplot(column="Age",by="Survived")

image

sns.scatterplot(x=dt["Age"],y=dt["Fare"])

image

sns.jointplot(x="Age",y="Fare",data=dt)

image

fig, ax1 = plt.subplots(figsize=(8,5))
pt=sns.boxplot(ax=ax1,x= 'Pclass',y='Age', hue='Gender',data=dt)

image

sns.catplot(data=dt,col = "Survived",x = "Gender", hue="Pclass",kind = "count")

image

corr=dt.corr()
sns.heatmap(corr,annot=True)

image

sns.pairplot(dt)

image

RESULT

Thus the Exploratory Data Analysis process is performed successfully on the given data using python code.

exno2ds's People

Contributors

dhinesh-sec avatar sjananisenthilkumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.