Skip to content

Deprecated function .ix (pandas) replaced by .iloc #14

@zeryas

Description

@zeryas

Hi,

I had the following error message when using scMatch.py code :

Traceback (most recent call last):
File "/mnt/CC_SinglC/scMatch/scMatch.py", line 357, in
main(testType, opt.dFormat, opt.testDS, opt.testGenes, opt.refDS, refTypeList, keepZeros, testMethodList, opt.coreNum)
File "/mnt/CC_SinglC/scMatch/scMatch.py", line 197, in main
AnnSCData(testType, em, refDS, refType, hidSpecDict[refType], keepZeros, testMethod, coreNum, savefolder)
File "/mnt/CC_SinglC/scMatch/scMatch.py", line 92, in AnnSCData
refDB = refDB.ix[~refDB.index.duplicated(keep='first'),]
File "/usr/lib/python3.10/site-packages/pandas/core/generic.py", line 5575, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'ix'

After search found that the pandas function .ix is deprecated and was replaced by .iloc function based on this post https://stackoverflow.com/questions/59991397/attributeerror-dataframe-object-has-no-attribute-ix

Maybe You could update the Code to more recent pandas version or specify the pandas version required for the code to work

Thank you !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions