Skip to content

Fix CRN and SODAPRO test failures with pandas 3 StringDtype#2729

Closed
joaquinhuigomez wants to merge 1 commit intopvlib:mainfrom
joaquinhuigomez:fix-pandas3-stringdtype-tests
Closed

Fix CRN and SODAPRO test failures with pandas 3 StringDtype#2729
joaquinhuigomez wants to merge 1 commit intopvlib:mainfrom
joaquinhuigomez:fix-pandas3-stringdtype-tests

Conversation

@joaquinhuigomez
Copy link
Copy Markdown

pandas 3 infers string columns as StringDtype instead of object, causing dtype mismatches in CRN (CRX_VN, ST_TYPE) and SODAPRO (Observation period) test assertions. This adds check_dtype=False to the affected assert_frame_equal calls, matching the approach used in #2668 for solar position tests. The remaining failures in #2728 (timezone-related) are covered by #2343.

@kandersolar
Copy link
Copy Markdown
Member

I don't think turning off all dtype checks is the best approach here. It made sense in #2668 because those dataframes have only a few columns with controlled outputs. The situation is more complex in iotools where we're ingesting outside data.

I have a PR in the works to fix #2728, so I'm closing this one.

@kandersolar kandersolar closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iotools test failures with pandas 3

2 participants