Analysis of the details of a person.
Step:1 Importing necessary packages.
Step:2 Read the data set.
Step:3 Execute the methods.
Step:4 Run the program.
Step:5 Get the output.
import pandas as pd
df = pd.read_csv("addresses.csv")
df.head(4)
df.info()
df.dropna(how='all').shape
df.fillna(0)
df.fillna(method='bfill')
df.duplicated()
exp = [13,23,28,12,5,9,31,26,10,19,22,24,29,4,25,30]
af=pd.DataFrame(exp)
af
q1=af.quantile(0.25)
q2=af.quantile(0.5)
q3=af.quantile(0.75)
iqr=q3-q1
low=q1-1.5*iqr
low
high=q1+1.5*iqr
high
sns.boxplot(data=af)
import pandas as pd
import matplotlib.pyplot as plt
data = pd.read_csv("addresses.csv")
plt.figure(figsize=(8, 4))
data['Desig'].value_counts().plot(kind='bar')
plt.title('Distribution of Desig')
plt.xlabel('Desig')
plt.ylabel('Count')
plt.show()
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
sns.pairplot(data, hue="Desig")
plt.show()
correlation_matrix = data.corr()
plt.figure(figsize=(8, 6))
sns.heatmap(correlation_matrix, annot=True, cmap="coolwarm")
plt.title("Correlation Matrix")
plt.show()
import pandas as pd
from sklearn.preprocessing import StandardScaler
numerical_features = ['ID']
scaler = StandardScaler()
data[numerical_features] = scaler.fit_transform(data[numerical_features])
data
from sklearn.preprocessing import MaxAbsScaler
scaler = MaxAbsScaler()
columns_to_scale = ['ID']
data[columns_to_scale] = scaler.fit_transform(data[columns_to_scale])
data
from sklearn.preprocessing import RobustScaler
scaler = RobustScaler()
data[['ID']] = scaler.fit_transform(data[['ID']])
data
data.skew()
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
import scipy.stats as stats
import numpy as np
np.log(df["ID"])
np.sqrt(df["ID"])
sm.qqplot(df['ID'],line='45')
plt.show()
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
plt.figure(figsize=(8, 4))
plt.hist(data['ID'], bins=10, color='skyblue', edgecolor='black')
plt.title('Position')
plt.xlabel('ID')
plt.ylabel('Frequency')
plt.show()
plt.figure(figsize=(8, 4))
sns.boxplot(data=data, x='ID', color='lightcoral')
plt.title('Position Boxplot')
plt.xlabel('ID')
plt.show()
plt.figure(figsize=(10, 4))
sns.countplot(data=data, x='Desig', palette='Set2')
plt.title('Desig Counts')
plt.xlabel('Desig')
plt.ylabel('Count')
plt.show()
Hence the program to analyze the data set using data science is applied sucessfully.