Skip to content

Commit

Permalink
better na_action value
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored and ivirshup committed Oct 10, 2023
1 parent 26e9099 commit 6a2ef10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion anndata/_core/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,9 @@ def concat(
[pd.Series(dim_indices(a, axis=axis)) for a in adatas], ignore_index=True
)
if index_unique is not None:
concat_indices = concat_indices.str.cat(label_col.map(str), sep=index_unique)
concat_indices = concat_indices.str.cat(
label_col.map(str, na_action="ignore"), sep=index_unique
)
concat_indices = pd.Index(concat_indices)

alt_indices = merge_indices(
Expand Down
2 changes: 1 addition & 1 deletion anndata/experimental/multi_files/_anncollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def __init__(
)
if index_unique is not None:
concat_indices = concat_indices.str.cat(
label_col.map(str), sep=index_unique
label_col.map(str, na_action="ignore"), sep=index_unique
)
self.obs_names = pd.Index(concat_indices)

Expand Down

0 comments on commit 6a2ef10

Please sign in to comment.