Give better errors when writing illegal column names
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 773
- Forks
- 209
- Avg merge
- 19h 41m
- Merged PRs (30d)
- 32
Description
There’s a too generic/unhelpful error when writing DataFrame column names that are
-
numeric
-
'index' -
containing slashes (unsure if this is still the case)
-
non-unicode: issue_52_demo.tar.gz
$ ./demo_load_maggie.py Variable names are not unique. To make them unique, call `.var_names_make_unique`. anndata/readwrite/write.py:301: UserWarning: Could not save field with key = "uns/condition_categories" to hdf5 file. 'to hdf5 file.'.format(key))
#52 has more details
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failure shown at anndata/readwrite/write.py:301 and review issue #52 for the additional reproduction details. Reproduce the write failures for numeric, 'index', slash-containing, and non-Unicode column names, then trace how the generic HDF5 warning is produced. Done means each reported case gives a specific, useful error instead of the generic message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100