Coder Social home page Coder Social logo

Comments (4)

mdeff avatar mdeff commented on August 16, 2024 1

Please see the Usage section in the README and do git checkout rc1. That's a duplicate of #9.

from fma.

victoreram avatar victoreram commented on August 16, 2024

Thank you for the response. I followed that, but now I'm getting a similar error:

ValueError                                Traceback (most recent call last)
<ipython-input-1-e0b9f0f91162> in <module>()
      1 import utils
----> 2 tracks = utils.load('C:\\Users\\ramir\\OneDrive\\Documents\\GitHub\\fma_metadata\\tracks.csv')
      3 tracks.shape

~\OneDrive\Documents\GitHub\fma\utils.py in load(filepath)
    200                    ('track', 'genres'), ('track', 'genres_all')]
    201         for column in COLUMNS:
--> 202             tracks[column] = tracks[column].map(ast.literal_eval)
    203 
    204         COLUMNS = [('track', 'date_created'), ('track', 'date_recorded'),

C:\Anaconda3\lib\site-packages\pandas\core\series.py in map(self, arg, na_action)
   2052                                      index=self.index).__finalize__(self)
   2053         else:
-> 2054             mapped = map_f(values, arg)
   2055             return self._constructor(mapped,
   2056                                      index=self.index).__finalize__(self)

pandas\src\inference.pyx in pandas.lib.map_infer (pandas\lib.c:62578)()

C:\Anaconda3\lib\ast.py in literal_eval(node_or_string)
     82                 return left - right
     83         raise ValueError('malformed node or string: ' + repr(node))
---> 84     return _convert(node_or_string)
     85 
     86 

C:\Anaconda3\lib\ast.py in _convert(node)
     81             else:
     82                 return left - right
---> 83         raise ValueError('malformed node or string: ' + repr(node))
     84     return _convert(node_or_string)
     85 

ValueError: malformed node or string: nan

In addition I get the warning:

DtypeWarning: Columns (0,1,5,6,8,12,18,20,21,22,24,33,34,38,39,44,47,48,49,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103) have mixed types. Specify dtype option on import or set low_memory=False.
if self.run_code(code, result):

from fma.

stanleyjs avatar stanleyjs commented on August 16, 2024

@mdeff 's git checkout rc1 fixed this for me.

@mdeff is there a version of fma_metadata.zip that can work with master?

from fma.

mdeff avatar mdeff commented on August 16, 2024

@victoreram I can't reproduce. What's your OS, and versions of python, numpy, and pandas?

from fma.

Related Issues (20)

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.