File size: 1,501 Bytes
cc7f4e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# -*- coding: utf-8 -*-
"""DiamondEconomicData.159

Automatically generated by Colab.

Original file is located at
    https://colab.research.google.com/drive/1S_CVJWdykN_6LSpjdHLcSQhC6UVUcFDe
"""

!pip install ydata-profiling

import pandas as pd
import numpy as np
import matplotlib as plt
import seaborn as sns
import tensorflow as tf
from ydata_profiling import ProfileReport

df = pd.read_csv('/content/M6_T2_V1_Diamonds.csv')

df.sample(5)

print(df.head())

df.info()

df.isnull().sum

df.describe()

df.duplicated().sum()

df.head()

df_numeric = df.select_dtypes(include=[np.number])
df_numeric

df_numeric.corr()['price']

df['cut'].value_counts().plot(kind='bar')

df['color'].value_counts().plot(kind='bar')

df['clarity'].value_counts().plot(kind='bar')

df['cut'].value_counts().plot(kind='pie', autopct='%.2f')

df['color'].value_counts().plot(kind='pie', autopct='%.2f')

df['clarity'].value_counts().plot(kind='pie', autopct='%.2f')

sns.histplot(df['price'])

sns.histplot(df['x'], bins=10)

sns.histplot(df['y'], bins=50)

sns.histplot(df['z'], bins=50)

sns.distplot(df['price'])

sns.distplot(df['x'])

sns.distplot(df['y'])

sns.distplot(df['z'])

sns.boxplot(df['price'])

sns.boxplot(df['x'])

sns.boxplot(df['y'])

sns.boxplot(df['z'])

sns.pairplot(df)

prof = ProfileReport(df)
prof.to_file(output_file='output.html')

from IPython.core.display import display, HTML

with open('/content/output.html', 'r') as file:
  html_content = file.read()

display(HTML(html_content))