Skip to content

Commit

Permalink
Update core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogaardt authored May 24, 2024
1 parent 5769ab4 commit 226d95a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xlcompose/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 226d95a

Please sign in to comment.