ModelicaRes icon indicating copy to clipboard operation
ModelicaRes copied to clipboard

to_pandas() error when progressing modified simulation data

Open FWuellhorst opened this issue 7 years ago • 0 comments

When trying to export simulation data to a dataFrame pandas raises a KeyError. The problem is that Dymola does not store the units into the *.mat-file when using Dymola functions like "writeTrajectory" or "Export Results". It would be great if the function's return line could be updated to a more dynamic one, like: return DataFrame(data).set_index('Time / '+self['Time'].unit) This way one could use to_pandas() for modified simulation data. Of course it would also be possible to change the data entry 'Time / ' to 'Time / s'.

FWuellhorst avatar Apr 19 '17 11:04 FWuellhorst