From 43f65888ad1ff9ecc929298bd2921805384076d2 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Dec 2025 22:45:49 -0600 Subject: [PATCH 1/2] Fixed exception type catching with Pandas update. --- tableone/tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tableone/tables.py b/tableone/tables.py index 2ec1974..f10fa04 100644 --- a/tableone/tables.py +++ b/tableone/tables.py @@ -442,7 +442,7 @@ def create_cont_table(self, try: table = table.join(nulltable) # if columns form a CategoricalIndex, need to convert to string first - except TypeError: + except (pd.errors.InvalidIndexError, TypeError): table.columns = table.columns.astype(str) table = table.join(nulltable) @@ -502,7 +502,7 @@ def create_cat_table(self, try: table = table.join(isnull) # if columns form a CategoricalIndex, need to convert to string first - except TypeError: + except (pd.errors.InvalidIndexError, TypeError): table.columns = table.columns.astype(str) table = table.join(isnull) From ab012811e9f351358c95da95b9edf420c100fa2e Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Fri, 12 Dec 2025 20:35:44 -0600 Subject: [PATCH 2/2] Reved to next dev release. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5ecabbc..6522b23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "tableone" -version = "0.9.5" +version = "0.9.6.dev1" authors = [ { name="Tom Pollard", email="tpollard@mit.edu" }, { name="Alistair Johnson" },