alek0991 / iSAFE

Pinpoints the mutation favored by selection
BSD 3-Clause "New" or "Revised" License
32 stars 11 forks source link

'DataFrame' object has no attribute 'sort_values' #1

Closed SC-Duan closed 6 years ago

SC-Duan commented 6 years ago

Hi, when I run the soft and got the error, how do I deal with it? /nfs/nfs1/src/isafe.py:125: UserWarning: With [--format hap], iSAFE assumes that derived allele is 1 and ancestral allele is 0 in the input file, and the selection is ongoing (the favored mutation is not fixed). warnings.warn("With [--format hap], iSAFE assumes that derived allele is 1 and ancestral allele is 0 in the input file, and the selection is ongoing (the favored mutation is not fixed).") 10000 SNPs and 952 Haplotypes [----] iSAFE Done! Traceback (most recent call last): File "/nfs/nfs1/src/isafe.py", line 212, in run() File "/nfs/nfs1/src/isafe.py", line 205, in run df_final = obj_isafe.isafe.loc[obj_isafe.isafe["freq"]<args.MaxFreq].sort_values("ordinal_pos").rename(columns={'id':"POS", 'isafe':'iSAFE', "freq":"DAF"}) File "/nfs/nfs1/dsc/program/Python/lib/python2.7/site-packages/pandas-0.16.2-py2.7-linux-x86_64.egg/pandas/core/generic.py", line 2150, in getattr (type(self).name, name)) AttributeError: 'DataFrame' object has no attribute 'sort_values'

alek0991 commented 6 years ago

Hi, sort_values() function is only available in pandas-0.17.0 or higher, while your pandas version is 0.16.2. Please check the following link for more details. AttributeError: 'DataFrame' object has no attribute 'sort_values'