Skip to content

Commit

Permalink
Empty dataframe instead of creating with an undefined variable (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfullard authored Sep 4, 2024
1 parent 8f683b6 commit 2e2ab3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion carsus/io/cmfgen/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2e2ab3c

Please sign in to comment.