aboutsummaryrefslogtreecommitdiffstats
path: root/python/markit/cds.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/markit/cds.py')
-rw-r--r--python/markit/cds.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/markit/cds.py b/python/markit/cds.py
index 80c7f8d2..d039b474 100644
--- a/python/markit/cds.py
+++ b/python/markit/cds.py
@@ -1,5 +1,6 @@
import io
import logging
+import lz4.frame
import os
import requests
import shutil
@@ -22,10 +23,10 @@ def download_cds_data(payload, workdate):
save_dir = BASE_DIR / "Tranche_data" / "CDS" / f"{workdate:%Y}"
if not save_dir.exists():
save_dir.mkdir()
- csv_file = save_dir / f"{workdate}_fixed.csv"
+ csv_file = save_dir / f"{workdate}_fixed.csv.lz4"
try:
with zipfile.ZipFile(content) as z:
- with csv_file.open("wb") as f2:
+ with lz4.frame.open(csv_file, "wb") as f2:
for f in z.namelist():
if f.endswith("csv"):
f1 = z.open(f)