BUG: Interval can contain end points with different time zones · Issue #18538 · pandas-dev/pandas (original) (raw)
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()
INSTALLED VERSIONS
commit: 88ab693
python: 3.6.1.final.0
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