scirpy icon indicating copy to clipboard operation
scirpy copied to clipboard

Consistent typing in adata.obs

Open grst opened this issue 5 years ago • 3 comments

  • Most columns added to adata.obs should probably be well-defined categoricals
  • Booleans should be booleans / or categoricals, and not strings
  • nan should be nan and not "nan". Categoricals do support nan, but there was an issue with how this is implemented in anndata, maybe this needs to be fixed upstream.

grst avatar Oct 02 '20 11:10 grst

Anndata supports now categoricals with nan values.

There are still some issues with anndata saving booleans. Also anndata can't save object dtypes, so we need to make sure to convert those to categoricals appropriately.

grst avatar Apr 13 '21 12:04 grst

Anndata now also supports nullable booleans: https://github.com/theislab/anndata/issues/504#issuecomment-1010352216

Nullable strings are still not supported (https://github.com/theislab/anndata/issues/679), but less important since categoricals are better in almost all cases anyway.

grst avatar Jan 12 '22 11:01 grst

superseded by #327

grst avatar Jun 28 '22 15:06 grst