From a5dd84af9eec0f835b3116bc7c470e57ef3f3e02 Mon Sep 17 00:00:00 2001 From: Kimoon Han <98246499+kmnhan@users.noreply.github.com> Date: Thu, 11 Apr 2024 08:29:55 +0900 Subject: [PATCH] fix(io): fix summary loading --- src/erlab/io/dataloader.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/erlab/io/dataloader.py b/src/erlab/io/dataloader.py index 2ca376e1..87c3ff97 100644 --- a/src/erlab/io/dataloader.py +++ b/src/erlab/io/dataloader.py @@ -428,11 +428,10 @@ def summarize( if usecache: try: df = pandas.read_pickle(pkl_path) + df = df.head(len(df)) except FileNotFoundError: pass - df = df.head(len(df)) - if df is None: df = self.generate_summary(data_dir, **kwargs) df.to_pickle(pkl_path)