internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: pandas-dev/pandas

Issue:
rolling on 0 window causes core dump


pd.__version__ == 0.22.0

```python
import pandas as pd
series = pd.Series(range(1000))
series.rolling(0).min()
```
#### Problem description

Attempting to perform an operation on a series.rolling with window=0 

kills the kernel if running with jupyter. 

causes a core dump if running directly from python.  


 free(): invalid next size (fast): 0x00007fffbfcc5040 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7fe14e0b0bfb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7fe14e0b6fc6]
...




#### Expected Output
Should raise a ValueError instead of crashing. 




Discussion:
Thanks for the report, yep should raise!

Resolving patch:
diff --git a/pandas/core/window.py b/pandas/core/window.py
--- a/pandas/core/window.py
+++ b/pandas/core/window.py
@@ -602,8 +602,8 @@ def validate(self):
         if isinstance(window, (list, tuple, np.ndarray)):
             pass
         elif is_integer(window):
-            if window < 0:
-                raise ValueError("window must be non-negative")
+            if window <= 0:
+                raise ValueError("window must be > 0 ")
             try:
                 import scipy.signal as sig
             except ImportError:


Test patch:
diff --git a/pandas/tests/test_window.py b/pandas/tests/test_window.py
--- a/pandas/tests/test_window.py
+++ b/pandas/tests/test_window.py
@@ -389,8 +389,8 @@ def test_constructor(self, which):
         c(window=2, min_periods=1, center=False)
 
         # GH 13383
-        c(0)
         with pytest.raises(ValueError):
+            c(0)
             c(-1)
 
         # not valid
@@ -409,7 +409,6 @@ def test_constructor_with_win_type(self, which):
         # GH 13383
         o = getattr(self, which)
         c = o.rolling
-        c(0, win_type='boxcar')
         with pytest.raises(ValueError):
             c(-1, win_type='boxcar')
Repository: pandas-dev/pandas

Issue:
DOC: doc string is not very clear for Series.quantile

#### Problem description
What is ``a la`` ? Is it French or a typo ? Suggest change it to something easy to understand 
https://github.com/pandas-dev/pandas/blob/f1631bec96dd9a1dc4890677b9c5475d0677e102/pandas/core/series.py#L1838-L1840

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.18.1
nose: 1.3.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.24.1
numpy: 1.13.3
scipy: 1.0.0
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.4.6
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.1.0
tables: 3.2.2
numexpr: 2.6.4
matplotlib: 2.1.1
openpyxl: 2.3.2
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.3
lxml: 3.6.4
bs4: 4.5.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.42.0
pandas_datareader: None

</details>



Discussion:

Resolving patch:
diff --git a/pandas/core/series.py b/pandas/core/series.py
--- a/pandas/core/series.py
+++ b/pandas/core/series.py
@@ -1837,7 +1837,7 @@ def round(self, decimals=0, *args, **kwargs):
 
     def quantile(self, q=0.5, interpolation='linear'):
         """
-        Return value at the given quantile, a la numpy.percentile.
+        Return value at the given quantile.
 
         Parameters
         ----------
@@ -1876,6 +1876,7 @@ def quantile(self, q=0.5, interpolation='linear'):
         See Also
         --------
         pandas.core.window.Rolling.quantile
+        numpy.percentile
         """
 
         self._check_percentile(q)


Test patch:
Repository: pandas-dev/pandas

Issue:
Typo in error message in the PlanePlot class
The error message should probably read: ' requires an x and a y column' not ' requires and x and y column'

https://github.com/pandas-dev/pandas/blob/0c65c57a279e755ab7093db925d1e580f9878dae/pandas/plotting/_core.py#L814


Discussion:
Thanks - want to submit a PR to fix?
I'm afraid I'm not set up to pull because of my work's firewall and lack of a computer at home (just a smart phone). Maybe I can do it from my phone, but I'm a newbie, so...
@pjk645 you can surely do it via smartphone (but it is gonna be a little tedious).

Marking this for `0.24.0` to give time for someone to contribute (`0.23.1` comes out on Friday), but if no one does, we should / can easily patch this for the next release.

Resolving patch:
diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py
--- a/pandas/plotting/_core.py
+++ b/pandas/plotting/_core.py
@@ -811,7 +811,7 @@ class PlanePlot(MPLPlot):
     def __init__(self, data, x, y, **kwargs):
         MPLPlot.__init__(self, data, **kwargs)
         if x is None or y is None:
-            raise ValueError(self._kind + ' requires and x and y column')
+            raise ValueError(self._kind + ' requires an x and y column')
         if is_integer(x) and not self.data.columns.holds_integer():
             x = self.data.columns[x]
         if is_integer(y) and not self.data.columns.holds_integer():


Test patch:
Repository: pandas-dev/pandas

Issue:
DOC: error in 0.23.0 concat sort warning?
#### Problem description

Pandas 0.23.0 adds a new warning when calling `concat` with misaligned axes (#20613):

```
FutureWarning: Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.

To accept the future behavior, pass 'sort=True'.

To retain the current behavior and silence the warning, pass sort=False
```

This seems strange; I'd assume that `sort=True` would give the current behaviour, and `sort=False` the future behaviour, as in the docs for `concat`: 

```
Explicitly pass sort=True to silence the warning and sort. Explicitly pass
sort=False to silence the warning and not sort.
```

I'm assuming the docs are right and the warning is wrong?


Discussion:
Whoops, you're correct. Mind making a PR to fix it? May have to update a test or two.
To clarify a bit (using the example from https://github.com/pandas-dev/pandas/issues/21174)

```
>>> df = pd.DataFrame({"a": [1, 2], "b": [1, 2]}, columns=['b', 'a'])
```

The warning only appears when the non-concatenation axis is not already aligned and `sort` is not explicitly passed.

```python
In [12]: df1 = pd.DataFrame(1, index=[0, 1], columns=['b', 'a'])

In [13]: df2 = pd.DataFrame(1, index=[0, 1], columns=['b', 'A'])

In [14]: pd.concat([df1, df2])
/Users/taugspurger/.virtualenvs/dask-dev/bin/ipython:1: FutureWarning: Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.

To accept the future behavior, pass 'sort=True'.

To retain the current behavior and silence the warning, pass sort=False

  #!/Users/taugspurger/Envs/dask-dev/bin/python3
Out[14]:
     A    a  b
0  NaN  1.0  1
1  NaN  1.0  1
0  1.0  NaN  1
1  1.0  NaN  1
```

The message saying how to achieve the future / current behavior is wrong. It should be

```
- To accept the future behavior, pass 'sort=False'.
- To accept the current behavior and silence the warning, pass 'sort=True'
```


Resolving patch:
diff --git a/pandas/core/indexes/api.py b/pandas/core/indexes/api.py
--- a/pandas/core/indexes/api.py
+++ b/pandas/core/indexes/api.py
@@ -24,9 +24,9 @@
 Sorting because non-concatenation axis is not aligned. A future version
 of pandas will change to not sort by default.
 
-To accept the future behavior, pass 'sort=True'.
+To accept the future behavior, pass 'sort=False'.
 
-To retain the current behavior and silence the warning, pass sort=False
+To retain the current behavior and silence the warning, pass 'sort=True'.
 """)
 
 


Test patch:
Repository: pandas-dev/pandas

Issue:
MultiIndex.is_unique is unbearably slow
#### Code Sample, a copy-pastable example if possible

```python
class Integer(object):

    goal_time = 0.2

    def setup(self):
        self.mi_int = MultiIndex.from_product([np.arange(1000),
                                               np.arange(1000)],
                                              names=['one', 'two'])
        self.obj_index = np.array([(0, 10), (0, 11), (0, 12),
                                   (0, 13), (0, 14), (0, 15),
                                   (0, 16), (0, 17), (0, 18),
                                   (0, 19)], dtype=object)

    def time_get_indexer(self):
        self.mi_int.get_indexer(self.obj_index)
```

#### Problem description

Code above is from asv. Running in ipython

``` python
i = Integer()
i.setup()
%lprun -f pd.MultiIndex.get_indexer i.time_get_indexer()
```

shows that half of the time is spent checking uniqueness. This is because ``MultiIndex.is_unique`` does not rely on the engine to check uniqueness (while it could).

Will push a fix in few minutes.

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: 9e982e18678c47c83ce2bb5932f844e2d9ee21f3
python: 3.5.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.9.0-6-amd64
machine: x86_64
processor: 
byteorder: little
LC_ALL: None
LANG: it_IT.UTF-8
LOCALE: it_IT.UTF-8

pandas: 0.24.0.dev0+116.g9e982e186
pytest: 3.5.0
pip: 9.0.1
setuptools: 39.2.0
Cython: 0.25.2
numpy: 1.14.3
scipy: 0.19.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.5.6
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.2.0dev
tables: 3.3.0
numexpr: 2.6.1
feather: 0.3.1
matplotlib: 2.2.2.post1153+gff6786446
openpyxl: 2.3.0
xlrd: 1.0.0
xlwt: 1.3.0
xlsxwriter: 0.9.6
lxml: 4.1.1
bs4: 4.5.3
html5lib: 0.999999999
sqlalchemy: 1.0.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.2.1


</details>



Discussion:

Resolving patch:
diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py
--- a/pandas/core/indexes/multi.py
+++ b/pandas/core/indexes/multi.py
@@ -852,14 +852,6 @@ def _has_complex_internals(self):
         # to disable groupby tricks
         return True
 
-    @cache_readonly
-    def is_monotonic(self):
-        """
-        return if the index is monotonic increasing (only equal or
-        increasing) values.
-        """
-        return self.is_monotonic_increasing
-
     @cache_readonly
     def is_monotonic_increasing(self):
         """
@@ -887,10 +879,6 @@ def is_monotonic_decreasing(self):
         # monotonic decreasing if and only if reverse is monotonic increasing
         return self[::-1].is_monotonic_increasing
 
-    @cache_readonly
-    def is_unique(self):
-        return not self.duplicated().any()
-
     @cache_readonly
     def _have_mixed_levels(self):
         """ return a boolean list indicated if we have mixed levels """


Test patch:
Repository: pandas-dev/pandas

Issue:
Error in docstring for pandas/core/frame.py
There is an error in the docstring for the query function in

`pandas/core/frame.py`.

The PR here fixes this: https://github.com/pandas-dev/pandas/pull/21731

#### Code Sample, a copy-pastable example if possible

```python
# Your code here

```
#### Problem description

[this should explain **why** the current behaviour is a problem and why the expected output is a better solution.]

**Note**: 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!

**Note**: Many problems can be resolved by simply upgrading `pandas` to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if `master` addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on `master` here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

#### Expected Output

#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]

</details>



Discussion:

Resolving patch:
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -2839,9 +2839,9 @@ def query(self, expr, inplace=False, **kwargs):
 
         Examples
         --------
-        >>> from numpy.random import randn
-        >>> from pandas import DataFrame
-        >>> df = pd.DataFrame(randn(10, 2), columns=list('ab'))
+        >>> import numpy as np
+        >>> import pandas as pd
+        >>> df = pd.DataFrame(np.random.randn(10, 2), columns=list('ab'))
         >>> df.query('a > b')
         >>> df[df.a > df.b]  # same result as the previous expression
         """


Test patch:
Repository: pandas-dev/pandas

Issue:
Backport PR #21769 on branch 0.23.x
Backport PR #21769: Removed Need for OHLC As First Element if Used in .agg


Discussion:

Resolving patch:
diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py
--- a/pandas/core/groupby/groupby.py
+++ b/pandas/core/groupby/groupby.py
@@ -3557,13 +3557,11 @@ def _aggregate_multiple_funcs(self, arg, _level):
                 obj._selection = name
             results[name] = obj.aggregate(func)
 
-        if isinstance(list(compat.itervalues(results))[0],
-                      DataFrame):
-
+        if any(isinstance(x, DataFrame) for x in compat.itervalues(results)):
             # let higher level handle
             if _level:
                 return results
-            return list(compat.itervalues(results))[0]
+
         return DataFrame(results, columns=columns)
 
     def _wrap_output(self, output, index, names=None):


Test patch:
diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py
--- a/pandas/tests/groupby/test_groupby.py
+++ b/pandas/tests/groupby/test_groupby.py
@@ -1674,3 +1674,22 @@ def test_tuple_correct_keyerror():
                                                           [3, 4]]))
     with tm.assert_raises_regex(KeyError, "(7, 8)"):
         df.groupby((7, 8)).mean()
+
+
+def test_groupby_agg_ohlc_non_first():
+    # GH 21716
+    df = pd.DataFrame([[1], [1]], columns=['foo'],
+                      index=pd.date_range('2018-01-01', periods=2, freq='D'))
+
+    expected = pd.DataFrame([
+        [1, 1, 1, 1, 1],
+        [1, 1, 1, 1, 1]
+    ], columns=pd.MultiIndex.from_tuples((
+        ('foo', 'ohlc', 'open'), ('foo', 'ohlc', 'high'),
+        ('foo', 'ohlc', 'low'), ('foo', 'ohlc', 'close'),
+        ('foo', 'sum', 'foo'))), index=pd.date_range(
+            '2018-01-01', periods=2, freq='D'))
+
+    result = df.groupby(pd.Grouper(freq='D')).agg(['sum', 'ohlc'])
+
+    tm.assert_frame_equal(result, expected)
Repository: pandas-dev/pandas

Issue:
read_csv Documentation Rendering Poorly
Looks like the `filepath_or_buffer` argument is rendering poorly in the `read_csv` documentation:

<img width="740" alt="image" src="https://user-images.githubusercontent.com/609873/43229729-a8d47712-901a-11e8-8bf4-80d307b33bc3.png">

Should be a pretty easy doc fix:

https://github.com/pandas-dev/pandas/blob/edb71fda022c6a155717e7a25679040ee0476639/pandas/io/parsers.py#L63


Discussion:
Seems to be a change in the rendering code (here / upstream).  That line hasn't changed in awhile.  It looks fine in the `0.22.0` docs, but looks like what you posted starting in `0.23.0`.

That being said, I generally prefer one-liner data type descriptions, so we can take this opportunity to shorten it for ease of reading anyhow.

Resolving patch:
diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py
--- a/pandas/io/parsers.py
+++ b/pandas/io/parsers.py
@@ -60,11 +60,16 @@
 
 Parameters
 ----------
-filepath_or_buffer : str, pathlib.Path, py._path.local.LocalPath or any \
-object with a read() method (such as a file handle or StringIO)
-    The string could be a URL. Valid URL schemes include http, ftp, s3, and
-    file. For file URLs, a host is expected. For instance, a local file could
-    be file://localhost/path/to/table.csv
+filepath_or_buffer : str, path object, or file-like object
+    Any valid string path is acceptable. The string could be a URL. Valid
+    URL schemes include http, ftp, s3, and file. For file URLs, a host is
+    expected. A local file could be: file://localhost/path/to/table.csv.
+
+    If you want to pass in a path object, pandas accepts either
+    ``pathlib.Path`` or ``py._path.local.LocalPath``.
+
+    By file-like object, we refer to objects with a ``read()`` method, such as
+    a file handler (e.g. via builtin ``open`` function) or ``StringIO``.
 %s
 delim_whitespace : boolean, default False
     Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be


Test patch:
Repository: pandas-dev/pandas

Issue:
DEPR: deprecated IntervalIndex.itemsize, remove IntervalArray.itemsize
From discussion at https://github.com/pandas-dev/pandas/pull/20611#discussion_r204674611

cc @jschendel 


Discussion:

Resolving patch:
diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py
--- a/pandas/core/arrays/interval.py
+++ b/pandas/core/arrays/interval.py
@@ -688,10 +688,6 @@ def size(self):
     def shape(self):
         return self.left.shape
 
-    @property
-    def itemsize(self):
-        return self.left.itemsize + self.right.itemsize
-
     def take(self, indices, allow_fill=False, fill_value=None, axis=None,
              **kwargs):
         """
diff --git a/pandas/core/indexes/interval.py b/pandas/core/indexes/interval.py
--- a/pandas/core/indexes/interval.py
+++ b/pandas/core/indexes/interval.py
@@ -369,8 +369,14 @@ def shape(self):
 
     @property
     def itemsize(self):
-        # Avoid materializing ndarray[Interval]
-        return self._data.itemsize
+        msg = ('IntervalIndex.itemsize is deprecated and will be removed in '
+               'a future version')
+        warnings.warn(msg, FutureWarning, stacklevel=2)
+
+        # supress the warning from the underlying left/right itemsize
+        with warnings.catch_warnings():
+            warnings.simplefilter('ignore')
+            return self.left.itemsize + self.right.itemsize
 
     def __len__(self):
         return len(self.left)


Test patch:
diff --git a/pandas/tests/indexes/interval/test_interval.py b/pandas/tests/indexes/interval/test_interval.py
--- a/pandas/tests/indexes/interval/test_interval.py
+++ b/pandas/tests/indexes/interval/test_interval.py
@@ -989,9 +989,11 @@ def test_itemsize(self):
         # GH 19209
         left = np.arange(0, 4, dtype='i8')
         right = np.arange(1, 5, dtype='i8')
-
-        result = IntervalIndex.from_arrays(left, right).itemsize
         expected = 16  # 8 * 2
+
+        with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
+            result = IntervalIndex.from_arrays(left, right).itemsize
+
         assert result == expected
 
     @pytest.mark.parametrize('new_closed', [
Repository: pandas-dev/pandas

Issue:
period_helper should be in cython
Doing maintenance is nigh-impossible ATM.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -234,7 +234,6 @@ def initialize_options(self):
         ujson_lib = pjoin(base, 'ujson', 'lib')
         self._clean_exclude = [pjoin(dt, 'np_datetime.c'),
                                pjoin(dt, 'np_datetime_strings.c'),
-                               pjoin(tsbase, 'period_helper.c'),
                                pjoin(parser, 'tokenizer.c'),
                                pjoin(parser, 'io.c'),
                                pjoin(ujson_python, 'ujson.c'),
@@ -616,10 +615,8 @@ def srcpath(name=None, suffix='.pyx', subdir='src'):
     '_libs.tslibs.period': {
         'pyxfile': '_libs/tslibs/period',
         'include': ts_include,
-        'depends': tseries_depends + [
-            'pandas/_libs/tslibs/src/period_helper.h'],
-        'sources': np_datetime_sources + [
-            'pandas/_libs/tslibs/src/period_helper.c']},
+        'depends': tseries_depends,
+        'sources': np_datetime_sources},
     '_libs.tslibs.resolution': {
         'pyxfile': '_libs/tslibs/resolution',
         'include': ts_include,


Test patch:
Repository: pandas-dev/pandas

Issue:
Resampling with NaT in TimedeltaIndex raises MemoryError
`DatetimeIndex` can handle `NaT`:

```
In [2]: dti = pd.DatetimeIndex(['1970-01-01 00:00:00', pd.NaT, '1970-01-01 00:00:02'])

In [3]: pd.DataFrame([2, 3, 5], dti).resample('1s').mean()
Out[3]: 
                       0
1970-01-01 00:00:00  2.0
1970-01-01 00:00:01  NaN
1970-01-01 00:00:02  5.0
```

But `TimedeltaIndex` can't:

```
In [4]: tdi = pd.to_timedelta(['0s', pd.NaT, '2s'])

In [5]: pd.DataFrame([2, 3, 5], tdi).resample('1s').mean()
...
MemoryError:
```

Versions:

```
python: 2.7.11.final.0
OS: Linux
machine: x86_64
pandas: 0.18.1+38.gc7e6f5f.dirty
numpy: 1.10.2
```



Discussion:
hmm, that's not too friendly.


Resolving patch:
diff --git a/pandas/core/resample.py b/pandas/core/resample.py
--- a/pandas/core/resample.py
+++ b/pandas/core/resample.py
@@ -1383,8 +1383,7 @@ def _get_time_delta_bins(self, ax):
                 data=[], freq=self.freq, name=ax.name)
             return binner, [], labels
 
-        start = ax[0]
-        end = ax[-1]
+        start, end = ax.min(), ax.max()
         labels = binner = TimedeltaIndex(start=start,
                                          end=end,
                                          freq=self.freq,


Test patch:
diff --git a/pandas/tests/test_resample.py b/pandas/tests/test_resample.py
--- a/pandas/tests/test_resample.py
+++ b/pandas/tests/test_resample.py
@@ -2887,6 +2887,16 @@ def test_asfreq_bug(self):
                                                    freq='1T'))
         assert_frame_equal(result, expected)
 
+    def test_resample_with_nat(self):
+        # GH 13223
+        index = pd.to_timedelta(['0s', pd.NaT, '2s'])
+        result = DataFrame({'value': [2, 3, 5]}, index).resample('1s').mean()
+        expected = DataFrame({'value': [2.5, np.nan, 5.0]},
+                             index=timedelta_range('0 day',
+                                                   periods=3,
+                                                   freq='1S'))
+        assert_frame_equal(result, expected)
+
 
 class TestResamplerGrouper(object):
Repository: pandas-dev/pandas

Issue:
Add 'table' as Allowed `orient` Value in to_json Docs
Right now the allowed values for Series and DataFrame objects are missing `table` as an allowed value for the `orient` parameter in to_json

https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_json.html




Discussion:
Is it? Am I missing something?

![screenshot from 2018-08-10 14-44-51](https://user-images.githubusercontent.com/14118472/43972841-1bef8fd2-9cac-11e8-868d-1cdefdc95f97.png)

Yep - look a little further up in your screenshot at the subsection for Series and DataFrame.

Very minor / nuanced but good to clean up for consistency

Resolving patch:
diff --git a/pandas/core/generic.py b/pandas/core/generic.py
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -1952,13 +1952,13 @@ def to_json(self, path_or_buf=None, orient=None, date_format=None,
             * Series
 
               - default is 'index'
-              - allowed values are: {'split','records','index'}
+              - allowed values are: {'split','records','index','table'}
 
             * DataFrame
 
               - default is 'columns'
               - allowed values are:
-                {'split','records','index','columns','values'}
+                {'split','records','index','columns','values','table'}
 
             * The format of the JSON string
 


Test patch: