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

Unsilenceable Index.format deprecation warning with pandas 2.2 #1537

Closed
paulimer opened this issue Feb 13, 2024 · 1 comment · Fixed by #1538
Closed

Unsilenceable Index.format deprecation warning with pandas 2.2 #1537

paulimer opened this issue Feb 13, 2024 · 1 comment · Fixed by #1538

Comments

@paulimer
Copy link

Using python 3.11, pandas 2.2 and reticulate 1.34 (the last one in conda), each time I send a dataframe to python (or one is returned, I can't tell), the following warning is displayed :
sys:1: FutureWarning: Index.format is deprecated and will be removed in a future version. Convert using index.astype(str) or index.map(formatter) instead.
It is not silenceable with py_suppress_warnings, and did not happen with pandas 2.1.4.

To reproduce the issue the following R code :

library(reticulate)
use_condaenv("warning")
warning <- import("warning")

iris_2 <- warning$test_df(iris)

python code :

import pandas as pd

def test_df(input_df):
    return input_df

and conda environment :

name: warning
channels:
    - bioconda
    - conda-forge
    - defaults
dependencies:
    - python=3.11
    - pandas=2.2
    - r-reticulate

is sufficient.

t-kalinowski added a commit that referenced this issue Feb 16, 2024
sys:1: FutureWarning: Index.format is deprecated and will be removed in a future version. Convert using index.astype(str) or index.map(formatter) instead.

closes #1537
@t-kalinowski
Copy link
Member

t-kalinowski commented Feb 19, 2024

Thank you for reporting! This is now fixed in the development version of reticulate.

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 a pull request may close this issue.

2 participants