cameronmartino / bacdivepy Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
Looks like there is a bug due to renaming column names. This probably means that pandas will need to be either updated, or version fixed.
search_data=retrieve(['Ruminococcus', 'Oscillospira', 'Bacteroides', 'Lactobacillus',
'Coprococcus', 'Clostridium', 'Parabacteroides', 'Alistipes',
'Roseburia', 'Prevotella'],
search_type='genus')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-12-b97e72b3c95c> in <module>
2 'Coprococcus', 'Clostridium', 'Parabacteroides', 'Alistipes',
3 'Roseburia', 'Prevotella'],
----> 4 search_type='genus')
~/miniconda3/envs/bacdivepy/lib/python3.7/site-packages/bacdive/DSMZClient.py in retrieve(search, search_type)
59 build_final.append(flat_dfs)
60
---> 61 build_final = clean_cat(pd.DataFrame(build_final).T)
62 return build_final
63
~/miniconda3/envs/bacdivepy/lib/python3.7/site-packages/bacdive/clean.py in clean_cat(search_data)
16 subdf = search_data.loc[[x for x in search_data.index if id_ in x],:].dropna(axis=1)
17 # fix col
---> 18 subdf.columns = ['DSM_'+id_]
19 # fix index
20 subdf.index = ['||'.join(x.split('||')[1:]) for x in subdf.index]
~/miniconda3/envs/bacdivepy/lib/python3.7/site-packages/pandas/core/generic.py in __setattr__(self, name, value)
5078 try:
5079 object.__getattribute__(self, name)
-> 5080 return object.__setattr__(self, name, value)
5081 except AttributeError:
5082 pass
pandas/_libs/properties.pyx in pandas._libs.properties.AxisProperty.__set__()
~/miniconda3/envs/bacdivepy/lib/python3.7/site-packages/pandas/core/generic.py in _set_axis(self, axis, labels)
636
637 def _set_axis(self, axis, labels):
--> 638 self._data.set_axis(axis, labels)
639 self._clear_item_cache()
640
~/miniconda3/envs/bacdivepy/lib/python3.7/site-packages/pandas/core/internals/managers.py in set_axis(self, axis, new_labels)
153 raise ValueError(
154 'Length mismatch: Expected axis has {old} elements, new '
--> 155 'values have {new} elements'.format(old=old_len, new=new_len))
156
157 self.axes[axis] = new_labels
ValueError: Length mismatch: Expected axis has 0 elements, new values have 1 elements
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.