Skip to content

Commit

Permalink
Merge pull request #86 from klarman-cell-observatory/yiming
Browse files Browse the repository at this point in the history
Fix bug in write_dataframe of zarr_utils
  • Loading branch information
yihming committed Jan 11, 2022
2 parents 5a243b3 + c13d036 commit ac8d262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pegasusio/zarr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def write_dataframe(self, parent: zarr.Group, name: str, df: pd.DataFrame) -> No
attrs_dict['index_name'] = df.index.name if df.index.name is not None else 'index'
self.write_series(group, '_index', df.index.values)
for col in df.columns:
if isinstance(df[col].values[0], PIL.Image.Image):
if (len(df[col]) != 0) and (isinstance(df[col].values[0], PIL.Image.Image)):
colgroup = group.create_group(col, overwrite = True)
x = 0
for data in df[col].values:
Expand Down

0 comments on commit ac8d262

Please sign in to comment.