From 73e258c3d98f219c14d9f7a229a24a612704022e Mon Sep 17 00:00:00 2001 From: TerenceLiu Date: Thu, 27 Jan 2022 00:20:26 +0800 Subject: [PATCH] add ECB --- CEDA/macroecon/ECB.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CEDA/macroecon/ECB.py diff --git a/CEDA/macroecon/ECB.py b/CEDA/macroecon/ECB.py new file mode 100644 index 0000000..832421a --- /dev/null +++ b/CEDA/macroecon/ECB.py @@ -0,0 +1,13 @@ +import pandas as pd + +url = { + "ECB": "http://sdw-wsrest.ecb.europa.eu/service/data/" +} + +class ECBData(object): + def __init__(self) -> None: + pass + def get_data(dataset:str=None): + tmp_url = url["ECB"] + "{}?format=csvdata".format(dataset) + data = pd.read_csv(tmp_url) + return data \ No newline at end of file