Update app.py
Browse files
app.py
CHANGED
@@ -13,11 +13,15 @@ from plotting import (
|
|
13 |
|
14 |
# Function to load chunked data based on date range
|
15 |
def load_timeseries_data(start_date, end_date):
|
16 |
-
|
|
|
|
|
17 |
return pd.read_csv(file_name, index_col=0, header=[0, 1, 2], parse_dates=True)
|
18 |
|
19 |
def load_other_features_data(start_date, end_date):
|
20 |
-
|
|
|
|
|
21 |
return pd.read_csv(file_name, index_col=0, header=0, parse_dates=True)
|
22 |
|
23 |
# Define the start and end dates
|
|
|
13 |
|
14 |
# Function to load chunked data based on date range
|
15 |
def load_timeseries_data(start_date, end_date):
|
16 |
+
start_date_str = pd.to_datetime(start_date).strftime('%Y-%m-%d')
|
17 |
+
end_date_str = pd.to_datetime(start_date).strftime('%Y-%m') + '-30'
|
18 |
+
file_name = f"enel_timeseries_data_{start_date_str}_{end_date_str}.csv"
|
19 |
return pd.read_csv(file_name, index_col=0, header=[0, 1, 2], parse_dates=True)
|
20 |
|
21 |
def load_other_features_data(start_date, end_date):
|
22 |
+
start_date_str = pd.to_datetime(start_date).strftime('%Y-%m-%d')
|
23 |
+
end_date_str = pd.to_datetime(start_date).strftime('%Y-%m') + '-30'
|
24 |
+
file_name = f"enel_other_features_data_{start_date_str}_{end_date_str}.csv"
|
25 |
return pd.read_csv(file_name, index_col=0, header=0, parse_dates=True)
|
26 |
|
27 |
# Define the start and end dates
|