@@ -36,7 +36,7 @@ def fetch_production(zone_key='JP-TK', target_datetime=None,
36
36
'JP-SK' :['JP-KN' , 'JP-CG' ],
37
37
'JP-CG' :['JP-KN' , 'JP-SK' , 'JP-KY' ]
38
38
}
39
- df = fetch_consumption (zone_key , target_datetime )
39
+ df = fetch_consumption_df (zone_key , target_datetime )
40
40
df ['imports' ] = 0
41
41
for zone in exch_map [zone_key ]:
42
42
df2 = occtonet .fetch_exchange (zone_key , zone , target_datetime )
@@ -66,7 +66,7 @@ def fetch_production(zone_key='JP-TK', target_datetime=None,
66
66
for i in range (df .shape [0 ]):
67
67
data = {
68
68
'zoneKey' : zone_key ,
69
- 'datetime' : df .loc [i , 'datetime' ],
69
+ 'datetime' : df .loc [i , 'datetime' ]. to_pydatetime () ,
70
70
'production' : {
71
71
'biomass' : None ,
72
72
'coal' : None ,
@@ -86,7 +86,7 @@ def fetch_production(zone_key='JP-TK', target_datetime=None,
86
86
return datalist
87
87
88
88
89
- def fetch_consumption (zone_key = 'JP-TK' , target_datetime = None ,
89
+ def fetch_consumption_df (zone_key = 'JP-TK' , target_datetime = None ,
90
90
logger = logging .getLogger (__name__ )):
91
91
"""
92
92
Returns the consumption for an area as a pandas DataFrame
0 commit comments