Hello,
I am trying to create anndata in Python, and I want to add metadata to each object.
I want to add a donor_id to my objects. Since one object is an RDS file that includes over 20 subjects and contains metadata called donor_id, I want to create one and be able to distinguish those 20 subjects separately. I have written my code as follows:
p9.obs['donor_id']='p9'
However, when I try to save the file, I receive this error message:
TypeError: Can't implicitly convert non-string objects to strings
How should I revise my code to avoid this error?
Thanks Andy