Fix test bug
Make parent dir for aeo open data series
@@ -36,7 +36,7 @@ def load_aeo_series(series_id: str, api_key: str, columns: list = None) -> pd.Da
Data from EIA's AEO via their open data API.
"""
data_dir = DATA_PATHS["eia"] / "open_data"
- data_dir.mkdir(exist_ok=True)
+ data_dir.mkdir(parents=True, exist_ok=True)
if not (data_dir / f"{series_id}.csv").exists():
url = f"https://api.eia.gov/series/?series_id={series_id}&api_key={api_key}&out=json"
r = requests.get(url)
@@ -345,10 +345,6 @@ def get_aeo_load(
3 2047 472.314972
4 2046 466.875671
"""
-
- data_dir = DATA_PATHS["eia"] / "open_data"
- data_dir.mkdir(exist_ok=True)
-
API_KEY = SETTINGS["EIA_API_KEY"]
SERIES_ID = (
