Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ from plotting import (
|
|
15 |
def load_timeseries_data_for_month(month):
|
16 |
start_date = pd.to_datetime(month).strftime('%Y-%m-01')
|
17 |
end_date = (pd.to_datetime(month) + pd.offsets.MonthEnd()).strftime('%Y-%m-%d')
|
18 |
-
file_name = f"
|
19 |
if not os.path.exists(file_name):
|
20 |
return None
|
21 |
return pd.read_csv(file_name, index_col=0, header=[0, 1, 2], parse_dates=True)
|
@@ -23,7 +23,7 @@ def load_timeseries_data_for_month(month):
|
|
23 |
def load_other_features_data_for_month(month):
|
24 |
start_date = pd.to_datetime(month).strftime('%Y-%m-01')
|
25 |
end_date = (pd.to_datetime(month) + pd.offsets.MonthEnd()).strftime('%Y-%m-%d')
|
26 |
-
file_name = f"
|
27 |
if not os.path.exists(file_name):
|
28 |
return None
|
29 |
return pd.read_csv(file_name, index_col=0, header=0, parse_dates=True)
|
@@ -32,11 +32,11 @@ def load_other_features_data_for_month(month):
|
|
32 |
months = pd.date_range(start='2022-09-01', end='2023-08-31', freq='MS').strftime('%Y-%m').tolist()
|
33 |
|
34 |
kpi_data = pd.read_csv(
|
35 |
-
r"
|
36 |
)
|
37 |
|
38 |
daily_timeseries_data = pd.read_csv(
|
39 |
-
r"
|
40 |
index_col=0,
|
41 |
header=0,
|
42 |
parse_dates=True,
|
|
|
15 |
def load_timeseries_data_for_month(month):
|
16 |
start_date = pd.to_datetime(month).strftime('%Y-%m-01')
|
17 |
end_date = (pd.to_datetime(month) + pd.offsets.MonthEnd()).strftime('%Y-%m-%d')
|
18 |
+
file_name = f"enel_timeseries_data_{start_date}_{end_date}.csv"
|
19 |
if not os.path.exists(file_name):
|
20 |
return None
|
21 |
return pd.read_csv(file_name, index_col=0, header=[0, 1, 2], parse_dates=True)
|
|
|
23 |
def load_other_features_data_for_month(month):
|
24 |
start_date = pd.to_datetime(month).strftime('%Y-%m-01')
|
25 |
end_date = (pd.to_datetime(month) + pd.offsets.MonthEnd()).strftime('%Y-%m-%d')
|
26 |
+
file_name = f"enel_other_features_data_{start_date}_{end_date}.csv"
|
27 |
if not os.path.exists(file_name):
|
28 |
return None
|
29 |
return pd.read_csv(file_name, index_col=0, header=0, parse_dates=True)
|
|
|
32 |
months = pd.date_range(start='2022-09-01', end='2023-08-31', freq='MS').strftime('%Y-%m').tolist()
|
33 |
|
34 |
kpi_data = pd.read_csv(
|
35 |
+
r"kpi_data.csv", index_col=0, header=0, parse_dates=True
|
36 |
)
|
37 |
|
38 |
daily_timeseries_data = pd.read_csv(
|
39 |
+
r"daily_aggregated_timeseries_data.csv",
|
40 |
index_col=0,
|
41 |
header=0,
|
42 |
parse_dates=True,
|