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

BUG: Interval can contain end points with different time zones #18538

jschendel opened this Issue Nov 28, 2017 · 0 comments


None yet
2 participants

jschendel commented Nov 28, 2017

Code Sample, a copy-pastable example if possible

In [2]: left = pd.Timestamp('2017-01-01', tz='US/Eastern')
   ...: right = pd.Timestamp('2017-01-02', tz='US/Pacific')
   ...: iv = pd.Interval(left, right)

In [3]: iv
Out[3]: Interval('2017-01-01', '2017-01-02', closed='right')

In [4]: iv.left
Out[4]: Timestamp('2017-01-01 00:00:00-0500', tz='US/Eastern')

In [5]: iv.right
Out[5]: Timestamp('2017-01-02 00:00:00-0800', tz='US/Pacific')

Problem description

An Interval can contain endpoints with different time zones.

Expected Output

I'd expect this to raise.

Output of pd.show_versions()


commit: 88ab693
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.22.0.dev0+247.g88ab693
pytest: 3.1.2
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.13.1
scipy: 0.19.1
pyarrow: 0.6.0
xarray: 0.9.6
IPython: 6.1.0
sphinx: 1.5.6
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: 3.4.2
numexpr: 2.6.2
feather: 0.4.0
matplotlib: 2.0.2
openpyxl: 2.4.8
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 0.9.8
lxml: 3.8.0
bs4: None
html5lib: 0.999
sqlalchemy: 1.1.13
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: 0.1.0
pandas_gbq: None
pandas_datareader: None

@jreback jreback added this to the Next Major Release milestone Nov 28, 2017

@jschendel jschendel referenced this issue Nov 29, 2017


ENH: Support TZ Aware IntervalIndex #18558

5 of 5 tasks complete

@jreback jreback modified the milestones: Next Major Release, 0.22.0 Nov 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment