bioalpha.h5ad_map.H5ADMap.strings_to_categoricals

H5ADMap.strings_to_categoricals(df: DataFrame | None = None)

Transform string annotations to categoricals.

Only affects string annotations that lead to less categories than the total number of observations.

Params

df

If df is None, modifies both obs and var, otherwise modifies df inplace.

Notes

Turns the view of an AnnData into an actual AnnData.