Spaces:
Runtime error
Runtime error
Update eda.py
Browse files
eda.py
CHANGED
@@ -34,17 +34,15 @@ def run():
|
|
34 |
|
35 |
# Barplot booking status
|
36 |
st.write('###### Status Cancel Reservation')
|
37 |
-
fig
|
38 |
-
sns.
|
39 |
-
plt.xticks(rotation='vertical')
|
40 |
-
plt.title('Barplot')
|
41 |
-
plt.show()
|
42 |
st.pyplot(fig)
|
43 |
|
|
|
44 |
# Barplot segmented market
|
45 |
st.write('###### Source of reservation')
|
46 |
fig=plt.figure(figsize=(15,5))
|
47 |
-
sns.
|
48 |
st.pyplot(fig)
|
49 |
|
50 |
# Barplot price room
|
@@ -53,13 +51,13 @@ def run():
|
|
53 |
labels =[1,2,3]
|
54 |
df['binned_price'] = pd.cut(df['avg_price_per_room'], bins,labels=labels).astype(int)
|
55 |
fig=plt.figure(figsize=(15,5))
|
56 |
-
sns.
|
57 |
st.pyplot(fig)
|
58 |
|
59 |
# Barplot type room
|
60 |
st.write('###### Room type reserved')
|
61 |
fig=plt.figure(figsize=(15,5))
|
62 |
-
sns.
|
63 |
st.pyplot(fig)
|
64 |
|
65 |
# Barplot lead time
|
@@ -69,10 +67,9 @@ def run():
|
|
69 |
labels =[1,2,3,4,5,6]
|
70 |
df['binned_lead_time'] = pd.cut(df['lead_time'], bins,labels=labels).astype(int)
|
71 |
fig=plt.figure(figsize=(15,5))
|
72 |
-
sns.
|
73 |
st.pyplot(fig)
|
74 |
|
75 |
-
|
76 |
|
77 |
|
78 |
if __name__ == '__main__':
|
|
|
34 |
|
35 |
# Barplot booking status
|
36 |
st.write('###### Status Cancel Reservation')
|
37 |
+
fig=plt.figure(figsize=(15,5))
|
38 |
+
sns.countplot(x='booking_status', data = df)
|
|
|
|
|
|
|
39 |
st.pyplot(fig)
|
40 |
|
41 |
+
|
42 |
# Barplot segmented market
|
43 |
st.write('###### Source of reservation')
|
44 |
fig=plt.figure(figsize=(15,5))
|
45 |
+
sns.countplot(x='market_segment_type', data = df)
|
46 |
st.pyplot(fig)
|
47 |
|
48 |
# Barplot price room
|
|
|
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')
|
59 |
fig=plt.figure(figsize=(15,5))
|
60 |
+
sns.countplot(x='room_type_reserved', data = df)
|
61 |
st.pyplot(fig)
|
62 |
|
63 |
# Barplot lead time
|
|
|
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 |
if __name__ == '__main__':
|