Skip to content

ENH: read_csv tz option #61535

Open
Open
@hasandiwan

Description

@hasandiwan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions