Code Monkey home page Code Monkey logo

exno2ds's Introduction

EXNO2DS

NAME: GURU REVANTH KUMARAVEL RADHIKA

DEPARTMENT: AI&DS

REGISTER NUMBER: 212223230065

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
df=pd.read_csv("/content/titanic_dataset.csv")
df

alt text

df.info()

alt text

df.shape

alt text

import pandas as pd
df=pd.read_csv("/content/titanic_dataset.csv")
df.set_index("PassengerId",inplace=True)
print(df.set_index)

alt text

df.describe()

alt text

df.nunique()

alt text

df["Survived"].value_counts()

alt text

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

alt text

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

alt text

df

alt text

df.Pclass.unique()

alt text

df.rename(columns={'sex':'Gender'},inplace=True)
df

alt text

import seaborn as sns
df=pd.read_csv("/content/titanic_dataset.csv")
sns.catplot(x="Sex",col='Survived',kind="count",data=df,height=5, aspect=.7)

alt text

sns.catplot(x='Survived',hue='Sex',data=df,kind='count')

alt text

df.boxplot(column='Age',by="Survived")

alt text

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

alt text

import matplotlib.pyplot as plt
fig,ax1=plt.subplots(figsize=(8,5))
pt=sns.boxplot(ax=ax1,x='Pclass',y='Age',hue='Sex',data=df)

alt text

sns.catplot(data=df,col='Survived',x='Sex',hue='Pclass',kind='count')

alt text

import seaborn as sns
corr=df.corr()
sns.heatmap(corr,annot=True)

alt text

sns.pairplot(df)

alt text

RESULT

Codes are successfully executed

exno2ds's People

Contributors

dhinesh-sec avatar guru-revanth 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.