AnnData Operations - AttributeError: 'DataFrame' object has no attribute 'dtype'

Examples of the error at 60 and 73.

Hello

I keep encountering the above error every time that I try to work with my concatenated file. Firstly it kept coming up when trying to flag mitochondrial genes and generate QC metrics, but now it’s coming up when I try to use Scanpy NormaliseData to normalise my counts.

AttributeError: ‘DataFrame’ object has no attribute ‘dtype’

Bizarrely, I had no problems with any of the input datasets or a concatenation of all the other datasets except for the Tabula Sapiens one - I can run tools on them fine.

What do I need to do to fix this error?

Thanks

Update from OP

I realised that tasks were only failing after I annotated some columns into obs - a tabular file (23). I thought one of the columns must be throwing things off so I cut that file into two and annotated each in and tried to do the next step - both failed.

I’m really confused now. I annotate anndata objects all the time and never has this happened, and I see nothing wrong with the columns.

Hi @miRlyKayleigh

Thanks for sharing the history, very helpful! I have a copy and am reviewing.

Let’s ask some single cell people to help with this too, just in case they recognize what is going on data-wise quicker. Would you have time to help @pavanvidem ?

Thanks and let’s start there. :slight_smile:

Thank you Jenna.

I can continue to work for now, without those annotations, but I’m so confused by it!

Now I really do need these annotations and it’s still doing it for some annotations but not others.

I thought the issue was with the fact that I uploaded my columns to be annotated but apparently it does it even if I cut one and do a regex on it and add it back.

I think it was caused by duplicate column names.

1 Like