-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_plotting.py
More file actions
72 lines (49 loc) · 1.22 KB
/
Copy pathdata_plotting.py
File metadata and controls
72 lines (49 loc) · 1.22 KB
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
# -*- coding: utf-8 -*-
"""Data_plotting.ipynb
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1SMZaYeQ8eOls321pF-xcbRCXZEcHDroZ
"""
# Commented out IPython magic to ensure Python compatibility.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# %matplotlib inline
df = sns.load_dataset('titanic')
df.head()
df = sns.load_dataset('tips')
df
sns.histplot(data=df,x='tip')
plt.show()
sns.kdeplot(data=df,x='tip')
plt.show()
sns.scatterplot(data=df,x=df['total_bill'], y='tip')
plt.show()
sns.lineplot(data=df,x=df['total_bill'], y='tip')
plt.show()
sns.regplot(data=df,x=df['total_bill'], y='tip')
plt.show()
sns.barplot(data=df,x='day', y='total_bill')
plt.show()
sns.countplot(data=df,x='day')
plt.show()
sns.boxplot(data=df,x='day', y='tip')
plt.show()
sns.violinplot(data=df,x='day', y='tip')
plt.show()
sns.stripplot(data=df,x='day', y='tip')
plt.show()
sns.swarmplot(data=df,x='day', y='tip')
plt.show()
sns.pairplot(df)
plt.show()
sns.set_style('whitegrid')
sns.pairplot(data=df,hue='sex', palette='Set2', diag_kind='kde')
plt.show()
df = pd.read_csv('USA_Housing.csv')
df
df.describe()
df.index
sns.pairplot(df)
plt.show()