<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="python3 setup.py test
"><pre class="notranslate"><span class="pl-s1">python3</span> <span class="pl-s1">setup</span>.<span class="pl-s1">py</span> <span class="pl-s1">test</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">table_schema (unittest.loader._FailedTest) ... ERROR<br>
json (unittest.loader._FailedTest) ... ERROR<br>
normalize (unittest.loader._FailedTest) ... ERROR</p>
<h2 dir="auto">======================================================================<br>
ERROR: table_schema (unittest.loader._FailedTest)</h2>
<p dir="auto">AttributeError: module 'pandas.io.json' has no attribute 'table_schema'</p>
<h2 dir="auto">======================================================================<br>
ERROR: json (unittest.loader._FailedTest)</h2>
<p dir="auto">AttributeError: module 'pandas.io.json' has no attribute 'json'</p>
<h2 dir="auto">======================================================================<br>
ERROR: normalize (unittest.loader._FailedTest)</h2>
<p dir="auto">AttributeError: module 'pandas.io.json' has no attribute 'normalize'</p>
<hr>
<p dir="auto"><strong>Note</strong>: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!</p>
<p dir="auto"><strong>Note</strong>: Many problems can be resolved by simply upgrading <code class="notranslate">pandas</code> to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if <code class="notranslate">master</code> addresses this issue, but that is not necessary.</p>
<p dir="auto">For documentation-related issues, you can check the latest versions of the docs on <code class="notranslate">master</code> here:</p>
<p dir="auto"><a href="https://pandas-docs.github.io/pandas-docs-travis/" rel="nofollow">https://pandas-docs.github.io/pandas-docs-travis/</a></p>
<p dir="auto">If the issue has not been resolved there, go ahead and file it in the issue tracker.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p>
</details>
<h4 dir="auto">Code Sample</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
start_end_idx = pd.IntervalIndex.from_arrays(start, end)
start_end_idx.name = 'port_time'
mm = mm.set_index(['imo','port_id', start_end_idx])
global_bins = mm.index
global_bins.get_loc((8801527, 5610.0, pd.to_datetime('2016-10-16 16:57:44.316')))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-s1">start_end_idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">IntervalIndex</span>.<span class="pl-en">from_arrays</span>(<span class="pl-s1">start</span>, <span class="pl-s1">end</span>)
<span class="pl-s1">start_end_idx</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s">'port_time'</span>
<span class="pl-s1">mm</span> <span class="pl-c1">=</span> <span class="pl-s1">mm</span>.<span class="pl-en">set_index</span>([<span class="pl-s">'imo'</span>,<span class="pl-s">'port_id'</span>, <span class="pl-s1">start_end_idx</span>])
<span class="pl-s1">global_bins</span> <span class="pl-c1">=</span> <span class="pl-s1">mm</span>.<span class="pl-s1">index</span>
<span class="pl-s1">global_bins</span>.<span class="pl-en">get_loc</span>((<span class="pl-c1">8801527</span>, <span class="pl-c1">5610.0</span>, <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>(<span class="pl-s">'2016-10-16 16:57:44.316'</span>)))</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/anaconda3/envs/mariquant/lib/python3.6/site-packages/pandas/core/indexes/interval.py in _engine(self)
    283     @cache_readonly
    284     def _engine(self):
--&gt; 285         return IntervalTree(self.left, self.right, closed=self.closed)
    286 
    287     @property

pandas/_libs/intervaltree.pxi in pandas._libs.interval.IntervalTree.__init__()

KeyError: ('datetime64[ns]', 'right')"><pre class="notranslate"><code class="notranslate">/anaconda3/envs/mariquant/lib/python3.6/site-packages/pandas/core/indexes/interval.py in _engine(self)
    283     @cache_readonly
    284     def _engine(self):
--&gt; 285         return IntervalTree(self.left, self.right, closed=self.closed)
    286 
    287     @property

pandas/_libs/intervaltree.pxi in pandas._libs.interval.IntervalTree.__init__()

KeyError: ('datetime64[ns]', 'right')
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">It is impossible to use non unique IntervalIndex with datetimes as start-end points. Both index.get_loc and DataFrame.loc produce the same error in IntervalTree.</p>
<h4 dir="auto">Expected Output</h4>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 38.5.1<br>
Cython: None<br>
numpy: 1.14.2<br>
scipy: 1.0.0<br>
pyarrow: None<br>
xarray: 0.10.2<br>
IPython: 6.2.1<br>
sphinx: 1.7.1<br>
patsy: 0.5.0<br>
dateutil: 2.7.0<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: 2.2.2<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 1.0.1<br>
sqlalchemy: 1.2.5<br>
pymysql: None<br>
psycopg2: 2.7.4 (dt dec pq3 ext lo64)<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>