Spaces:
Runtime error
Runtime error
Commit
·
3e870fa
1
Parent(s):
651f5f1
Update dynamic_pricing.py
Browse files- dynamic_pricing.py +17 -17
dynamic_pricing.py
CHANGED
@@ -13,8 +13,8 @@ import joblib
|
|
13 |
import numpy as np
|
14 |
import pandas as pd
|
15 |
|
16 |
-
import matplotlib.pyplot as plt
|
17 |
-
import seaborn as sns
|
18 |
# %matplotlib inline
|
19 |
|
20 |
from sklearn.model_selection import train_test_split
|
@@ -44,21 +44,21 @@ X_test = X_test.iloc[:, 3:]
|
|
44 |
|
45 |
X_train.info
|
46 |
|
47 |
-
plt.figure(figsize = (12, 8))
|
48 |
-
plot = sns.countplot(x = 'day_of_week', data = X_train)
|
49 |
-
plt.xticks(rotation = 90)
|
50 |
-
for p in plot.patches:
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
plt.title("Price changes based on day")
|
60 |
-
plt.xlabel("Day")
|
61 |
-
plt.ylabel("Price")
|
62 |
|
63 |
print(sum(X_train["day_of_week"].isnull()))
|
64 |
print(sum(X_test["day_of_week"].isnull()))
|
|
|
13 |
import numpy as np
|
14 |
import pandas as pd
|
15 |
|
16 |
+
# import matplotlib.pyplot as plt
|
17 |
+
# import seaborn as sns
|
18 |
# %matplotlib inline
|
19 |
|
20 |
from sklearn.model_selection import train_test_split
|
|
|
44 |
|
45 |
X_train.info
|
46 |
|
47 |
+
# plt.figure(figsize = (12, 8))
|
48 |
+
# plot = sns.countplot(x = 'day_of_week', data = X_train)
|
49 |
+
# plt.xticks(rotation = 90)
|
50 |
+
# for p in plot.patches:
|
51 |
+
# plot.annotate(p.get_height(),
|
52 |
+
# (p.get_x() + p.get_width() / 2.0,
|
53 |
+
# p.get_height()),
|
54 |
+
# ha = 'center',
|
55 |
+
# va = 'center',
|
56 |
+
# xytext = (0, 5),
|
57 |
+
# textcoords = 'offset points')
|
58 |
+
|
59 |
+
# plt.title("Price changes based on day")
|
60 |
+
# plt.xlabel("Day")
|
61 |
+
# plt.ylabel("Price")
|
62 |
|
63 |
print(sum(X_train["day_of_week"].isnull()))
|
64 |
print(sum(X_test["day_of_week"].isnull()))
|