Skip to content

ENH: read_csv tz option #61535

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

Open
1 of 3 tasks
hasandiwan opened this issue Jun 2, 2025 · 1 comment
Open
1 of 3 tasks

ENH: read_csv tz option #61535

hasandiwan opened this issue Jun 2, 2025 · 1 comment
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@hasandiwan
Copy link

hasandiwan commented Jun 2, 2025

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I use pd.read_csv to grab a series of timestamp'd links interactively from a remote website.

Feature Description

I would like it to convert the columns specified by parse_dates to the timezone specified by wherever the /etc/localtime link points to by default in a non-deprecated manner:

[frame.loc[:,c].dt.tz_convert('/'.join([os.getenv('TZ', os.path.realpath('/etc/localtime').split('/')[-2:])][0])) for c in frame.select_dtypes('datetime64[ns, UTC]')]`

I'd like to propose this functionality as the tz parameter to read_csv. I suspect the implementation is not python, and can't find it in my git checkout of pandas.

Alternative Solutions

Covered above

Additional Context

@hasandiwan hasandiwan added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 2, 2025
@datapythonista
Copy link
Member

I don't think we'll implement this. read_csv has too way many parameters already, and this can be done after the CSV is read, if I'm not missing anything. But let's see what others think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants