Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust for pandas 2.0.0 #693

Open
khaeru opened this issue Mar 1, 2023 · 2 comments
Open

Adjust for pandas 2.0.0 #693

khaeru opened this issue Mar 1, 2023 · 2 comments
Labels
ci Continuous integration discuss Discussion, design, and planning enh New features & functionality

Comments

@khaeru
Copy link
Member

khaeru commented Mar 1, 2023

Parallel to iiasa/ixmp#470; see description there for details.

@khaeru khaeru added enh New features & functionality ci Continuous integration discuss Discussion, design, and planning labels Mar 1, 2023
@khaeru
Copy link
Member Author

khaeru commented Mar 1, 2023

  1. Check for any FutureWarnings from pandas 1.5.3 / pre-2.0.0 occurring in either message_ix itself or its upstream dependencies.

Here is the latest nightly run of the "pytest" CI workflow:

=============================== warnings summary ===============================
../../../../../../opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/jupyter_client/connect.py:20
  /opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

message_ix/tests/test_macro.py::test_calc_valid_years
  /home/runner/work/message_ix/message_ix/message_ix/message_ix/tests/test_macro.py:84: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
    data["gdp_calibrate"] = data["gdp_calibrate"].append(gdp_extra_yr)

message_ix/tests/tools/test_add_year.py::test_add_year
message_ix/tests/tools/test_add_year.py::test_add_year_cli
  /home/runner/work/message_ix/message_ix/message_ix/message_ix/tools/add_year/__init__.py:323: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
    yr_cat.append(

message_ix/tests/tools/test_add_year.py::test_add_year
message_ix/tests/tools/test_add_year.py::test_add_year
message_ix/tests/tools/test_add_year.py::test_add_year
message_ix/tests/tools/test_add_year.py::test_add_year
message_ix/tests/tools/test_add_year.py::test_add_year_cli
message_ix/tests/tools/test_add_year.py::test_add_year_cli
message_ix/tests/tools/test_add_year.py::test_add_year_cli
message_ix/tests/tools/test_add_year.py::test_add_year_cli
  /home/runner/work/message_ix/message_ix/message_ix/message_ix/tools/add_year/__init__.py:934: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
    df2 = df2.append(df_yr)

These appear to be multiple occurrences of the same issue: use of pandas.DataFrame.append().

@khaeru
Copy link
Member Author

khaeru commented Mar 1, 2023

Note that #494 could be a vehicle for making the required changes in .tools.add_year, or they could be cherry-picked from there, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration discuss Discussion, design, and planning enh New features & functionality
Projects
None yet
Development

No branches or pull requests

1 participant