Skip to content

See here for pandas 3 support #821

Description

@jnettels

Hi, installing pandapipes in complex environments became more and more difficult, because all other packages I use have transitioned to pandas 3.* at this point. Only pandapipes/pandapower are still limited to pandas<3.0. For me using pandas 2 is causing "seemingly random" errors in unrelated packages.

It now took me less time to fix all the pandas 3 errors in pandapipes than what I had previously spent on manually restricting broken dependencies.

I published all the required changes here:
https://github.com/jnettels/pandapipes/tree/fix/pandas3

There are not even that many changes required, just a bunch of
res_table['deltat_k'].values[:] changing to
res_table.loc[:, 'deltat_k'].

However, e.g.
res_table[res_name].values[pt] had to be changed to
res_table.iloc[pt, res_table.columns.get_loc(res_name)]
and I must admit that I am not 100% sure iloc might be necessary instead of loc in some more places (where during my tests I could not tell if the indexer was the actual index or just the index number.)
Nevertheless, all tests are passing and my examples run fine.

Besides the actual code changes, I changed the pandapower dependency to a fork, too:
https://github.com/jnettels/pandapower/tree/fix/pandas3

(pandapower 3.3.3 did not show any conflicts with pandas 3, only the dependency in pyproject.toml had to be removed.)

I will gladly create a PR from my changes if that is useful. But as another PR of mine #776 seems to be ignored and there also seems to be some larger restructuring going on in #820 I am not sure about that.

Cheers and thanks for this project!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions