Skip to content

Problems using select() with pandas 3.0.0 #76

Open

Description

@snow73

What happened?

Hi,

I have noticed an issue when using pandas 3.0.0 and using select() on a fieldset. It was no longer possible to select fields based on endStep (returned fieldset was None) while selecting using shortName and step worked fine. If I explicitly work with pandas 2.3.3 this problem does not arise.

Maybe this actually applies to all keys which are not part of the standard set (e.g. listed with ls()), but I didn't test that yet.

Best regards
Dennis

What are the steps to reproduce the bug?

new = mv.regrid(data=f.select(shortName=parameter, endStep=step), grid=[2, 2])

pip install metview pandas==2.3.3
--> works
pip install metview pandas==3.0.0
--> doesn't work

Version

v1.16.2

Platform (OS and architecture)

Linux b1548b5f5c57 6.12.67-linuxkit #1 SMP Sun Jan 25 02:26:28 UTC 2026 aarch64 aarch64 aarch64 GNU/Linux

Relevant log output

Accompanying data

No response

Organisation

MeteoIQ GmbH

Activity

  1. iainrussell commented on Feb 16, 2026

    @iainrussell
    Member

    Hi @snow73,
    Thanks for reporting this! I can reproduce it. It seems that pandas 3.0 is stricter in type-checking. We have a set of pre-defined keys with their preferred types (int/str/etc) - step is in there, but endStep is not. The quick workaround is to change your query to put quotes around your endStep value to make it a string: step="90". If you think this will be a problem, we can look at making endStep an int by default.

  2. snow73 commented on Feb 18, 2026

    @snow73
    Author

    Hi @iainrussell, no worries, I have downgraded to pandas 2.3.3 for the time being. Thanks for pointing out the workaround!

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions