Skip to content

DataFrame & Tabulator display timezone aware pd.Series in UTC #3012

Open
@MarcMassar

Description

The DataFrame and Tabulator widgets display timezone aware series in UTC (without any indication of the timezone).

Panel versions: 0.12.1

to reproduce:

import datetime
import pytz
import panel as pn
import pandas as pd

pn.extension('tabulator', sizing_mode="stretch_width")

df = pd.DataFrame({'t_no_tz': [datetime.datetime.now()],
                   't_with_tz':  [datetime.datetime.now(pytz.timezone('US/Eastern'))]})

display(df)

pn.Row(pn.widgets.Tabulator(df))

As a workaround I am doing df.t_tz_est.dt.tz_localize(None), which for me is good enough but is a little ugly.

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions