From 02228b175d50091266d11e830eafdffb76d309a5 Mon Sep 17 00:00:00 2001 From: yohplala Date: Wed, 21 Aug 2024 18:31:13 +0200 Subject: [PATCH] More robustness when dealing with pandas column multi-index. --- oups/store/writer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oups/store/writer.py b/oups/store/writer.py index 45d7ba8..8f22042 100644 --- a/oups/store/writer.py +++ b/oups/store/writer.py @@ -229,13 +229,14 @@ def check_cmidx(chunk): Most notably, fastparquet requires names for each level in a Multiindex. If these are not set, there are set to '', an empty string. + Also, column names have to be tuple of string. - Multiindex is modified in-place. + DataFrame is modified in-place. Parameters ---------- chunk : DataFrame - DataFrame which multi-index is to check. + DataFrame with a column multi-index to check and possibly adjust. Returns -------