Skip to content

Only transfer obs columns to pseudobulk when they have one unique value when grouped #1023

@LuisHeinzlmeier

Description

@LuisHeinzlmeier

Description of feature

At the moment, we take the first value of each obs in the grouped DataFrame when creating pseudobulks. This could be misleading if a grouped obs shows more than one value. I would only include the obs that show one unique value when grouped. I'd be happy to revise that if wanted.

grouped = original_obs.groupby(grouping_cols, observed=False)[missing_cols].first()

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions