From 2e2ab3c5d98e115c69666e0f5fff89f28f4ea938 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 4 Sep 2024 16:35:06 -0400 Subject: [PATCH] Empty dataframe instead of creating with an undefined variable (#402) --- carsus/io/cmfgen/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carsus/io/cmfgen/base.py b/carsus/io/cmfgen/base.py index acf7aec7e..843877e0b 100644 --- a/carsus/io/cmfgen/base.py +++ b/carsus/io/cmfgen/base.py @@ -47,7 +47,7 @@ def load(self, fname): df = pd.read_csv(fname, **config) except pd.errors.EmptyDataError: - df = pd.DataFrame(columns=columns) + df = pd.DataFrame() logger.warning(f"Empty table: `{fname}`.") if df.shape[1] == 10: