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

dataviewer does not display timezone info for timezone-aware datetimeindex #16223

Open
xuancong84 opened this issue Nov 13, 2024 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@xuancong84
Copy link

When a dataframe has tz-aware datetimeindex, dataviewer does not display timezone info correctly.

For example,

import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randn(10), index=pd.date_range('2024-10-01', '2024-10-10', tz='+08:00'))

print(df) gives:

                                  0
2024-10-01 00:00:00+08:00 -0.202646
2024-10-02 00:00:00+08:00 -0.655969
2024-10-03 00:00:00+08:00  0.193421
2024-10-04 00:00:00+08:00  0.553439
2024-10-05 00:00:00+08:00  1.318152
2024-10-06 00:00:00+08:00 -0.469305
2024-10-07 00:00:00+08:00  0.675554
2024-10-08 00:00:00+08:00 -1.817027
2024-10-09 00:00:00+08:00 -0.183109
2024-10-10 00:00:00+08:00  1.058969

But datetimeviewer gives:
Image

The datetimeindex are all in UTC-0 instead of UTC+08.

@xuancong84 xuancong84 added the bug Issue identified by VS Code Team member as probable bug label Nov 13, 2024
@amunger
Copy link
Contributor

amunger commented Nov 13, 2024

What data viewer is that? I'm not seeing that with Data Wrangler:
Image

@amunger amunger added the info-needed Issue requires more information from poster label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants