Skip to content

to_pandas error #34

@arnoutaertgeerts

Description

@arnoutaertgeerts

Kevin, are you still using ModelicaRes often? I keep getting error messages with respect to natu :) If I want to translate the SimRes object to a dataFrame I get the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-85a33601c9f3> in <module>()
----> 1 data.to_pandas(names=keys)

/home/arnout/anaconda/lib/python2.7/site-packages/ModelicaRes-0.12.2_117_g9339ef6_dirty-py2.7.egg/modelicares/simres.pyc in to_pandas(self, names, aliases)
   1649 
   1650             if unit:
-> 1651                 data.update({name + ' / ' + unit: values})
   1652             else:
   1653                 data.update({name: values})

/home/arnout/anaconda/lib/python2.7/site-packages/natu/exponents.pyc in __add__(x, y)
    461         """x.__add__(y) <==> x+y"""
    462         copy = x.copy()
--> 463         for base, exp in y.items():
    464             copy[base] += exp
    465         return copy

AttributeError: 'str' object has no attribute 'items'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions