Skip to content

Commit 34c4f58

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d363216 commit 34c4f58

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/anndata/_core/aligned_df.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def mk_index(l: int) -> pd.Index:
5959
df = pd.DataFrame(
6060
anno,
6161
index=None if length is None else mk_index(length),
62-
columns=None if len(anno) else [],
62+
columns=None if anno else [],
6363
)
6464

6565
if length is None:

src/anndata/_io/specs/methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ def read_dataframe_partial(
10411041
df = pd.DataFrame(
10421042
{k: read_elem_partial(elem[k], indices=indices[0]) for k in columns},
10431043
index=read_elem_partial(elem[idx_key], indices=indices[0]),
1044-
columns=columns if len(columns) else None,
1044+
columns=columns if columns else None,
10451045
)
10461046
if idx_key != "_index":
10471047
df.index.name = idx_key

0 commit comments

Comments
 (0)