Transform string annotations to categoricals.
Only affects string annotations that lead to less categories than the total number of observations.
DataFrame
None
Optional
If df is None, modifies both obs and var, otherwise modifies df inplace.
df
obs
var
Notes
Turns the view of an AnnData into an actual AnnData.
AnnData