rmarkello / abagen

A toolbox for working with Allen Human Brain Atlas microarray expression data
https://abagen.readthedocs.io
BSD 3-Clause "New" or "Revised" License
92 stars 41 forks source link

BUG: TypeError: set_axis() got an unexpected keyword argument 'inplace' #213

Closed Ianyliu closed 11 months ago

Ianyliu commented 1 year ago

When running abagen.get_expression_data(atlas['image'], atlas['info']), the following error appears:

TypeError                                 Traceback (most recent call last)
<ipython-input-9-36173f5d483f> in <cell line: 1>()
----> 1 abagen.get_expression_data(atlas['image'], atlas['info'])

1 frames
/usr/local/lib/python3.9/dist-packages/abagen/probes_.py in collapse_probes(microarray, annotation, probes, method, donor_probes)
    755         for donor, micro in microarray.items():
    756             symbols = probes.loc[micro.columns, 'gene_symbol']
--> 757             micro = micro.set_axis(symbols, axis=1, inplace=False)
    758             microarray[donor] = micro.sort_index(axis=1)
    759 

TypeError: set_axis() got an unexpected keyword argument 'inplace'

The latest set_axis function from Pandas does not seem to have an 'inplace' parameter as mentioned by this StackOverflow post.

This should be an easy and quick fix

Ianyliu commented 1 year ago

I submitted a pull request to fix this: https://github.com/rmarkello/abagen/pull/214

liuzhenqi77 commented 11 months ago

This should have been resolved by recent PRs. Thank you for reporting the issue and submitting the PR.