<p dir="auto">should raise when <code class="notranslate">orient='columns'</code> and index is non_unique<br>
<code class="notranslate">orient='index'</code> and column is non_unique?</p>
<p dir="auto">I'm trying out to_json and read_json on a data frame with 800k rows. However, after calling to_json on the file, read_json gets back only 2k rows. This happens if I call them in series or if I give to_json a filename and call the filename with read_json. Judging by the size of the file, all the data is being written (the json is roughly the size of the pickled data frame object). Any idea what's going on?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/05ab6f60a358e356db26f4bdd360f2180bff4b70374e05edebc0eb0e657338f8/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3631313132322f3835363336322f30663864303066382d663533622d313165322d386166392d3236353838366637666330332e706e67"><img src="https://camo.githubusercontent.com/05ab6f60a358e356db26f4bdd360f2180bff4b70374e05edebc0eb0e657338f8/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3631313132322f3835363336322f30663864303066382d663533622d313165322d386166392d3236353838366637666330332e706e67" alt="image" data-canonical-src="https://f.cloud.github.com/assets/611122/856362/0f8d00f8-f53b-11e2-8af9-265886f7fc03.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2761597/25880143/a872d5e8-3503-11e7-90f0-2244a52845d4.png"><img width="939" alt="screen shot 2017-05-09 at 10 03 25 pm" src="https://cloud.githubusercontent.com/assets/2761597/25880143/a872d5e8-3503-11e7-90f0-2244a52845d4.png" style="max-width: 100%;"></a></p>
<p dir="auto">In the above, I have a region that I'm querying for with a partially overlapping interval. The query succeeds when the interval is partially overlapping until it doesn't, throwing the key error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KeyError                                  Traceback (most recent call last)
/Users/alex/Documents/GarNet/venv/lib/python3.6/site-packages/pandas/core/indexing.py in _has_valid_type(self, key, axis)
   1433                 if not ax.contains(key):
-&gt; 1434                     error()
   1435             except TypeError as e:

/Users/alex/Documents/GarNet/venv/lib/python3.6/site-packages/pandas/core/indexing.py in error()
   1428                 raise KeyError(&quot;the label [%s] is not in the [%s]&quot; %
-&gt; 1429                                (key, self.obj._get_axis_name(axis)))
   1430 

KeyError: 'the label [(5409951, 5409965]] is not in the [index]'"><pre class="notranslate"><code class="notranslate">KeyError                                  Traceback (most recent call last)
/Users/alex/Documents/GarNet/venv/lib/python3.6/site-packages/pandas/core/indexing.py in _has_valid_type(self, key, axis)
   1433                 if not ax.contains(key):
-&gt; 1434                     error()
   1435             except TypeError as e:

/Users/alex/Documents/GarNet/venv/lib/python3.6/site-packages/pandas/core/indexing.py in error()
   1428                 raise KeyError("the label [%s] is not in the [%s]" %
-&gt; 1429                                (key, self.obj._get_axis_name(axis)))
   1430 

KeyError: 'the label [(5409951, 5409965]] is not in the [index]'
</code></pre></div>
<p dir="auto">I think this is particularly confusing because there doesn't seem to be any prominent difference between the <code class="notranslate">loc</code>s that succeed and the <code class="notranslate">loc</code> that fails as far as I can tell. I know <a href="https://github.com/pandas-dev/pandas/pull/15309#issuecomment-287936736" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/15309/hovercard">we had discussed <code class="notranslate">loc</code>'s behavior in this context</a> but I'm not sure we came to a conclusion.</p>
<p dir="auto">By the way, my larger question is about how to find intersections between two <code class="notranslate">IntervalIndex</code>. It seems like the <a href="https://github.com/pandas-dev/pandas/pull/15309#issuecomment-284081223" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/15309/hovercard"><code class="notranslate">find_intersections</code></a> function didn't make it into this release <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jreback/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jreback">@jreback</a> ? Let me know! =]</p>