Skip to content

Bump pandas from 2.1.4 to 2.2.1#216

Merged
kemccusker merged 9 commits intomainfrom
dependabot/pip/pandas-2.2.1
Apr 4, 2024
Merged

Bump pandas from 2.1.4 to 2.2.1#216
kemccusker merged 9 commits intomainfrom
dependabot/pip/pandas-2.2.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Feb 26, 2024

Bumps pandas from 2.1.4 to 2.2.1.

Release notes

Sourced from pandas's releases.

Pandas 2.2.1

We are pleased to announce the release of pandas 2.2.1. This release includes some new features, bug fixes, and performance improvements. We recommend that all users upgrade to this version.

See the full whatsnew for a list of all the changes. Pandas 2.2.1 supports Python 3.9 and higher.

The release will be available on the defaults and conda-forge channels:

conda install pandas

Or via PyPI:

python3 -m pip install --upgrade pandas

Please report any issues with the release on the pandas issue tracker.

Thanks to all the contributors who made this release possible.

Pandas 2.2.0

We are pleased to announce the release of pandas 2.2.0. This release includes some new features, bug fixes, and performance improvements. We recommend that all users upgrade to this version.

See the full whatsnew for a list of all the changes. Pandas 2.2.0 supports Python 3.9 and higher.

The release will be available on the defaults and conda-forge channels:

conda install pandas

Or via PyPI:

python3 -m pip install --upgrade pandas

Please report any issues with the release on the pandas issue tracker.

Thanks to all the contributors who made this release possible.

Pandas 2.2.0rc0

We are pleased to announce a release candidate for pandas 2.2.0. If all goes well, we'll release pandas 2.2.0 in about two weeks.

See the whatsnew for a list of all the changes.

The release will be available on conda-forge and PyPI.

The release can be installed from PyPI

python -m pip install --upgrade --pre pandas==2.2.0rc0 Or from conda-forge

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Feb 26, 2024
@dependabot dependabot bot force-pushed the dependabot/pip/pandas-2.2.1 branch from e378801 to 032687d Compare February 27, 2024 20:42
@dependabot dependabot bot force-pushed the dependabot/pip/pandas-2.2.1 branch from 032687d to b315363 Compare March 21, 2024 20:24
Bumps [pandas](https://github.com/pandas-dev/pandas) from 2.1.4 to 2.2.1.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Commits](pandas-dev/pandas@v2.1.4...v2.2.1)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@brews brews requested review from brews and kemccusker and removed request for brews April 3, 2024 19:39
@brews
Copy link
Copy Markdown
Member

brews commented Apr 3, 2024

Ah, sorry, I marked you as reivewer @kemccusker because I got the update on the issue. I don't mind merging this but wasn't sure if you already wanted to handle this one. If you weren't already planning it, could you take 5 minutes and review this before the end of the week, @kemccusker?

Copy link
Copy Markdown
Member

@brews brews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the fix!

I might suggest adding a comment to each of the tests that needed changing explaining why all this sorting and index shuffling is needed. I feel like I wouldn't be able to grok what's going on (or the "why" of it) if I was reading through the tests.

@brews
Copy link
Copy Markdown
Member

brews commented Apr 3, 2024

First, sorry for the spam.

If you haven't already tried it, you might be able to ditch some or all of the index/column ordering I've been complaining about by passing check_like=True to pandas.testing.assert_frame_equal() unless index/column sorting has some subtlety you need to enforce that I'm not seeing.

@JMGilbert
Copy link
Copy Markdown
Contributor

JMGilbert commented Apr 3, 2024

First, sorry for the spam.

If you haven't already tried it, you might be able to ditch some or all of the index/column ordering I've been complaining about by passing check_like=True to pandas.testing.assert_frame_equal() unless index/column sorting has some subtlety you need to enforce that I'm not seeing.

This works, but requires setting the indices of both dataframes, something like:

e = expected.set_index(['ssp','gcm',...])
a = actual.set_index(['ssp','gcm',...])
assert_frame_equal(a, e, check_like = True)

Maybe we should be actually using the index dimensions (like ssp, gcm, etc) as pandas indices in the first place.

@kemccusker
Copy link
Copy Markdown
Member

@JMGilbert I like the idea to set_index on index dimensions, assuming we know them ahead of time

@brews
Copy link
Copy Markdown
Member

brews commented Apr 3, 2024

@JMGilbert Is the index information you're setting something already available in all the "expected" files used for the test, but not set as the index by open_zipped_results()? Any reason it wouldn't be possible to pass args/kwargs to open_zipped_results() (which get passed to pd.read_csv()) and so have it set the index to expected when the data is read in?

@brews
Copy link
Copy Markdown
Member

brews commented Apr 3, 2024

Ahhhh. I see what's going on. I was totally misreading the issue. I tried your solution @JMGilbert and I think it works great. Thank you for being patient with me everyone.

I did it like:

    # Set index so can compare unsorted tables.
    idx = ["model", "ssp", "rcp", "gcm", "year"]
    actual = actual.set_index(idx)
    expected = expected.set_index(idx)

    assert_frame_equal(expected, actual, rtol=1e-4, atol=1e-4, check_like=True)

@kemccusker kemccusker merged commit 847aaaa into main Apr 4, 2024
@kemccusker kemccusker deleted the dependabot/pip/pandas-2.2.1 branch April 4, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants