Giter Site home page Giter Site logo

bacdivepy's People

Contributors

cameronmartino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

microdm

bacdivepy's Issues

outdated due to pandas

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.