mukhlishr commited on
Commit
92f7219
1 Parent(s): 7ee9d9c

Update eda.py

Browse files
Files changed (1) hide show
  1. eda.py +16 -15
eda.py CHANGED
@@ -46,13 +46,13 @@ def run():
46
  st.pyplot(fig)
47
 
48
  # Barplot price room
49
- st.write('###### Price room categories (1 = low, 2 = medium, 3 = high)')
50
- bins = [-1, 100,200,1000]
51
- labels =[1,2,3]
52
- df['binned_price'] = pd.cut(df['avg_price_per_room'], bins,labels=labels).astype(int)
53
- fig=plt.figure(figsize=(15,5))
54
- sns.countplot(x='binned_price', data = df)
55
- st.pyplot(fig)
56
 
57
  # Barplot type room
58
  st.write('###### Room type reserved')
@@ -61,14 +61,15 @@ def run():
61
  st.pyplot(fig)
62
 
63
  # Barplot lead time
64
- st.write('###### lead time date reservation to date stay (1 = low, 2 = medium, 3 = high)')
65
- st.write('###### 1 = < 3 days, 2 = 3-7 days, 3 = 7-14 days, 4 = 14 -30 days, 5 = 30 - 90 days, 6 = > 90 days)')
66
- bins = [-1, 3, 7, 14,30,90,500]
67
- labels =[1,2,3,4,5,6]
68
- df['binned_lead_time'] = pd.cut(df['lead_time'], bins,labels=labels).astype(int)
69
- fig=plt.figure(figsize=(15,5))
70
- sns.countplot(x='binned_lead_time', data = df)
71
- st.pyplot(fig)
 
72
 
73
 
74
 
 
46
  st.pyplot(fig)
47
 
48
  # Barplot price room
49
+ #st.write('###### Price room categories (1 = low, 2 = medium, 3 = high)')
50
+ #bins = [-1, 100,200,1000]
51
+ #labels =[1,2,3]
52
+ #df['binned_price'] = pd.cut(df['avg_price_per_room'], bins,labels=labels).astype(int)
53
+ #fig=plt.figure(figsize=(15,5))
54
+ #sns.countplot(x='binned_price', data = df)
55
+ #st.pyplot(fig)
56
 
57
  # Barplot type room
58
  st.write('###### Room type reserved')
 
61
  st.pyplot(fig)
62
 
63
  # Barplot lead time
64
+ #st.write('###### lead time date reservation to date stay (1 = low, 2 = medium, 3 = high)')
65
+ #st.write('###### 1 = < 3 days, 2 = 3-7 days, 3 = 7-14 days, 4 = 14 -30 days, 5 = 30 - 90 days, 6 = > 90 days)')
66
+ #bins = [-1, 3, 7, 14,30,90,500]
67
+ #labels =[1,2,3,4,5,6]
68
+ #df['binned_lead_time'] = pd.cut(df['lead_time'], bins,labels=labels).astype(int)
69
+ #fig=plt.figure(figsize=(15,5))
70
+ #sns.countplot(x='binned_lead_time', data = df)
71
+ #st.pyplot(fig)
72
+
73
 
74
 
75