Open lillyzhan opened 6 months ago
Hi Lilly,
The command (genes_shared = adata_st.var.index & adata_st_new.var.index
) selects genes that are measured in both single-cell spatial transcriptomics data. The error message TypeError: unsupported operand type(s) for &: 'str' and 'str'
is very likely to be caused by using a pandas version in which the intersection between two pandas.Index objects using '&' is not supported. May I know the pandas package version you are using?
Best, Gefei
Hi Professor,
The pandas version is 2.0.3. Thanks for the explanation.
Best regards, Lilly
Downgrading pandas to a version <=1.5.3 may help fix the error.
Dear professor, I am getting this TypeError: unsupported operand type(s) for &: 'str' and 'str' error in the function preprocessing in utils.py on the line 205. I tought that genes_shared should be a number but adata_st.var.index are list of strings. Could you help me fix the error or explain what the line of code genes_shared = adata_st.var.index & adata_st_new.var.index is meant to do? This error only appears in the windows system.
Thanks in advance. Lilly