update DAC utils
@@ -28,10 +28,11 @@ def load_pandas_df(local_cache_path=None, num_rows=None):
pd.DataFrame: pandas DataFrame containing the loaded dataset.
"""
zip_file = URL.split("/")[-1]
- csv_file_path = os.path.join(local_cache_path, zip_file.replace(".zip", ""))
-
maybe_download(URL, zip_file, local_cache_path)
+ zip_file_path = os.path.join(local_cache_path, zip_file)
+ csv_file_path = os.path.join(local_cache_path, zip_file.replace(".zip", ""))
+
if not os.path.exists(csv_file_path):
- extract_zip(file_path=csv_file_path, dest_path=local_cache_path)
+ extract_zip(file_path=zip_file_path, dest_path=local_cache_path)
return pd.read_csv(csv_file_path, nrows=num_rows)
