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

pandas2ri - requires pytz #1079

Open
dyrvte opened this issue Nov 30, 2023 · 5 comments
Open

pandas2ri - requires pytz #1079

dyrvte opened this issue Nov 30, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dyrvte
Copy link

dyrvte commented Nov 30, 2023

Since ZoneInfo is now being used as the standard for Python I switched my pandas dataset from using pytz for timezones to ZoneInfo. It appears pandas2ri does not support this currently:

pandas2ri.py:65: UserWarning: Error while trying to convert the column ... Fall back to string conversion. The error is: 'zoneinfo.ZoneInfo' object has no attribute 'zone'

This attribute is not present in ZoneInfo

@dyrvte dyrvte added the bug Something isn't working label Nov 30, 2023
@lgautier lgautier self-assigned this Nov 30, 2023
@lgautier
Copy link
Member

@dyrvte - Can you share a minimal code example to reproduce the issue?

@dyrvte
Copy link
Author

dyrvte commented Dec 29, 2023 via email

@lgautier
Copy link
Member

lgautier commented Jan 7, 2024

Thanks I can't reproduce on this end with rpy2 3.5.15, and pandas 2.1.3. Can you share the output of

python -m rpy2.situation

and

python -c 'import pandas; print(pandas.__version__)'

@dyrvte
Copy link
Author

dyrvte commented Jan 7, 2024 via email

@lgautier
Copy link
Member

lgautier commented Jan 7, 2024

Also working with pandas 2.1.4 on this end. I have Python 3.10.
If zoneinfo is involved it should be the same since it is available since Python 3.9 (https://docs.python.org/3/library/zoneinfo.html). I'll try with Python 3.11 later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants