From 226d95a7f461daeac2158e1545ce65511b0f0cd0 Mon Sep 17 00:00:00 2001 From: John S Bogaardt Date: Fri, 24 May 2024 13:55:59 -0600 Subject: [PATCH] Update core.py --- xlcompose/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xlcompose/core.py b/xlcompose/core.py index a3b3919..b972e5a 100644 --- a/xlcompose/core.py +++ b/xlcompose/core.py @@ -587,7 +587,7 @@ def _format_validation(self, formats): idx.index = [self.data.columns.name] else: idx = pd.Series(dtype='object') - cols = self.data.dtypes.append(idx) + cols = pd.concat((self.data.dtypes, idx), axis=0) self.formats = { k: self.base_formats.get(v, self.base_formats['object']) for k, v in dict(zip(cols.index, cols.values)).items()} @@ -804,7 +804,8 @@ def column_widths(self): return self._column_widths data = np.array( [item.column_widths for item in self.args - if item.__class__.__name__ not in ['Title']]) + if item.__class__.__name__ not in ['Title']], + dtype='object') lens = np.array([len(i) for i in data]) mask = np.arange(lens.max()) < lens[:,None] out = np.zeros(mask.shape, dtype=data.dtype)