Skip to content

Optimization fails with pandas 0.24 #171

Description

@dhblum

This issue is to address an error that occurs in the function JModelica._get_control_results(), where the control results are converted to a pandas series with datetime index. The error occurs because of the lines:

timeindex = self._global_start_time_utc + timedelta;
ts_opt = pd.Series(data = data, index = timeindex).tz_localize('UTC');

In pandas 0.22, the first line creates a timezone unaware timeindex. In pandas 0.24, it creates a timezone aware timeindex, causing the second line to fail with

TypeError: Already tz-aware, use tz_convert to convert.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions