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

Issue:
Minor inaccurracy in documentation of read_csv's option mangle_dupe_cols
### Code example:

File `test.csv`:
```
,a,a,b
0,1,2,3
1,4,5,6
```

Python code:
``` python
import pandas as pd
df = pd.read_csv("test.csv")
df.columns.values
```

Gives `['a', 'a.1', 'b' ] ` and not, as documented `['a.0', 'a.1', 'b']`

#### Problem description

The documentation states that names will be specified as ‘X.0’...’X.N’, but in fact the names become 'X','X.1',...'X.N'

So in contrast to what the documentation says, the duplicate column-name is not changed at the first occurrence and only subsequent occurrences get a number appended.

#### Expected Output

Either change the code to mangle the first duplicate column name, or simply fix the documentation.

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.14.11-200.fc26.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.22.0
pytest: 3.3.1
pip: 9.0.1
setuptools: 36.6.0
Cython: None
numpy: 1.14.0
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.5.5
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.3.0
numexpr: 2.6.1
feather: None
matplotlib: 2.1.1
openpyxl: None
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: None
lxml: None
bs4: 4.6.0
html5lib: 1.0b10
sqlalchemy: 1.1.13
pymysql: None
psycopg2: 2.6.2 (dt dec pq3 ext lo64)
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>



Discussion:
That observation seems correct. Do you want to do a PR to update the docs?
Sure, I'll submit a PR today.

Resolving patch:
diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py
--- a/pandas/io/parsers.py
+++ b/pandas/io/parsers.py
@@ -114,7 +114,7 @@
 prefix : str, default None
     Prefix to add to column numbers when no header, e.g. 'X' for X0, X1, ...
 mangle_dupe_cols : boolean, default True
-    Duplicate columns will be specified as 'X.0'...'X.N', rather than
+    Duplicate columns will be specified as 'X', 'X.1', ...'X.N', rather than
     'X'...'X'. Passing in False will cause data to be overwritten if there
     are duplicate names in the columns.
 dtype : Type name or dict of column -> type, default None


Test patch:
Repository: pandas-dev/pandas

Issue:
DEPR: change Panel DeprecationWarning -> FutureWarning
- [x] ``Panel`` #15601 

Move to #6581 when converted to `FutureWarning`


Discussion:

Resolving patch:
diff --git a/pandas/core/panel.py b/pandas/core/panel.py
--- a/pandas/core/panel.py
+++ b/pandas/core/panel.py
@@ -151,7 +151,7 @@ def __init__(self, data=None, items=None, major_axis=None, minor_axis=None,
                       "http://xarray.pydata.org/en/stable/.\n"
                       "Pandas provides a `.to_xarray()` method to help "
                       "automate this conversion.\n",
-                      DeprecationWarning, stacklevel=3)
+                      FutureWarning, stacklevel=3)
 
         self._init_data(data=data, items=items, major_axis=major_axis,
                         minor_axis=minor_axis, copy=copy, dtype=dtype)


Test patch:
diff --git a/pandas/tests/generic/test_label_or_level_utils.py b/pandas/tests/generic/test_label_or_level_utils.py
--- a/pandas/tests/generic/test_label_or_level_utils.py
+++ b/pandas/tests/generic/test_label_or_level_utils.py
@@ -46,7 +46,7 @@ def df_duplabels(df):
 
 @pytest.fixture
 def panel():
-    with tm.assert_produces_warning(DeprecationWarning,
+    with tm.assert_produces_warning(FutureWarning,
                                     check_stacklevel=False):
         return pd.Panel()
Repository: pandas-dev/pandas

Issue:
DOC: period missing at end of the pandas.DataFrame docstring
#### Problem description

There is a full stop missing at the end of the pandas.DataFrame docstring.

#### Code Sample

```python
import pandas as pd
help(pd.DataFrame)
```

#### Expected Output

Two-dimensional [...] The primary pandas data structure **.**

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
--------------–--
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Darwin
OS-release: 17.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.22.0
pytest: None
pip: None
setuptools: 36.8.0
Cython: 0.27.3
numpy: 1.13.3
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.5
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 0+unknown
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
</details>



Discussion:
I don't think the Numpy Docstring Standard explicitly requires periods. I took a quick look and other "core" classes (like `Index` and `MultiIndex`) are also missing periods at the end of their respective docstrings so if one wants to make this aesthetic change it would probably be best to write a script with the appropriate regular expression to put the periods where they aren't.

Resolving patch:
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -250,7 +250,7 @@ class DataFrame(NDFrame):
     """ Two-dimensional size-mutable, potentially heterogeneous tabular data
     structure with labeled axes (rows and columns). Arithmetic operations
     align on both row and column labels. Can be thought of as a dict-like
-    container for Series objects. The primary pandas data structure
+    container for Series objects. The primary pandas data structure.
 
     Parameters
     ----------


Test patch:
Repository: pandas-dev/pandas

Issue:
Series.nonzero(): Returns locations, not indices
#### Problem description
Documentation says

Series.nonzero(): Return the indices of the elements that are non-zero

while it actually seems to return the integer locations.


#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: AMD64 Family 21 Model 16 Stepping 1, AuthenticAMD
byteorder: little
LC_ALL: None
LANG: en
LOCALE: None.None

pandas: 0.21.0
pytest: None
pip: 9.0.1
setuptools: 36.5.0.post20170921
Cython: None
numpy: 1.13.3
scipy: 0.19.1
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.3
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.1.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
</details>



Discussion:
It'd be good to clarify that the return values is the integer locations.
What is the difference between indices and integer locations? It seems to me that the documentation is very clear.
Indices may be the index labels, which may or may not match the positions.

On Fri, Jan 19, 2018 at 1:28 PM, Dror Atariah <notifications@github.com>
wrote:

> What is the difference between indices and integer locations? It seems to
> me that the documentation is very clear.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/issues/19312#issuecomment-359065327>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABQHIoaF9A8Jb8VN_xJTMaSLWzSsexCfks5tMOzEgaJpZM4RkRWk>
> .
>


Resolving patch:
diff --git a/pandas/core/series.py b/pandas/core/series.py
--- a/pandas/core/series.py
+++ b/pandas/core/series.py
@@ -490,7 +490,7 @@ def compress(self, condition, *args, **kwargs):
 
     def nonzero(self):
         """
-        Return the indices of the elements that are non-zero
+        Return the *integer* indices of the elements that are non-zero
 
         This method is equivalent to calling `numpy.nonzero` on the
         series data. For compatibility with NumPy, the return value is
@@ -508,6 +508,15 @@ def nonzero(self):
         3    4
         dtype: int64
 
+        >>> s = pd.Series([0, 3, 0, 4], index=['a', 'b', 'c', 'd'])
+        # same return although index of s is different
+        >>> s.nonzero()
+        (array([1, 3]),)
+        >>> s.iloc[s.nonzero()[0]]
+        b    3
+        d    4
+        dtype: int64
+
         See Also
         --------
         numpy.nonzero


Test patch:
Repository: pandas-dev/pandas

Issue:
to_clipboard excel defaults to "None", but doc string says "True"
#### Problem description
I just started using python/pandas a couple of months ago. So this might be a misunderstanding on my part. The excel argument to the to_clipboard function defaults to "None", but doc string says "True".  If this is a simple docstring change, I would like to contribute :) 

https://github.com/pandas-dev/pandas/blob/a00154dcfe5057cb3fd86653172e74b6893e337d/pandas/core/generic.py#L1566-L1589

#### Expected Output
The docstring should be `defaults to None`
#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Darwin
OS-release: 16.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.22.0
pytest: None
pip: 9.0.1
setuptools: 38.4.0
Cython: None
numpy: 1.14.0
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>



Discussion:
Ah ~ I see what is going on here. 

https://github.com/pandas-dev/pandas/blob/d3f7d2a666aa824e2df98083aa5c1fd9bb63252e/pandas/io/clipboards.py#L96-L97

The docstring is definitely confusing when looking at the signature. Not sure if there is a better docstring.
I think default arg in the function signature could be changed to `True` - want to try a PR?

Resolving patch:
diff --git a/pandas/core/generic.py b/pandas/core/generic.py
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -1906,7 +1906,7 @@ def to_pickle(self, path, compression='infer',
         return to_pickle(self, path, compression=compression,
                          protocol=protocol)
 
-    def to_clipboard(self, excel=None, sep=None, **kwargs):
+    def to_clipboard(self, excel=True, sep=None, **kwargs):
         """
         Attempt to write text representation of object to the system clipboard
         This can be pasted into Excel, for example.
diff --git a/pandas/io/clipboards.py b/pandas/io/clipboards.py
--- a/pandas/io/clipboards.py
+++ b/pandas/io/clipboards.py
@@ -63,7 +63,7 @@ def read_clipboard(sep=r'\s+', **kwargs):  # pragma: no cover
     return read_table(StringIO(text), sep=sep, **kwargs)
 
 
-def to_clipboard(obj, excel=None, sep=None, **kwargs):  # pragma: no cover
+def to_clipboard(obj, excel=True, sep=None, **kwargs):  # pragma: no cover
     """
     Attempt to write text representation of object to the system clipboard
     The clipboard can be then pasted into Excel for example.


Test patch:
Repository: pandas-dev/pandas

Issue:
SparseDataFrame to_csv returns IndexError: too many indices for array
Calling to_csv on a SparseDataFrame returns IndexError: too many indices for array.
```python
import pandas as pd
from scipy.sparse import rand

x = rand(100, 10001, density=0.2, format='csr')
df = pd.SparseDataFrame(x)
df.to_csv("tmp.csv")
```

Calling .to_dense() on the df prior to writing out, of course, works fine.
```python
df.to_dense().to_csv("tmp.csv")
```

I'd like to be able to save sparse data to disk.  If for some reason it shouldn't be written out this way, is there any way to add that in the doc or the error message?

#### Expected Output

Nontype, no exception, and a csv on the file system.

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Darwin
OS-release: 16.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.21.0
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.13.3
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.1.0
psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

</details>



Discussion:

Resolving patch:
diff --git a/pandas/core/internals.py b/pandas/core/internals.py
--- a/pandas/core/internals.py
+++ b/pandas/core/internals.py
@@ -709,7 +709,8 @@ def to_native_types(self, slicer=None, na_rep='nan', quoting=None,
                         **kwargs):
         """ convert to our native types format, slicing if desired """
 
-        values = self.values
+        values = self.get_values()
+
         if slicer is not None:
             values = values[:, slicer]
         mask = isna(values)


Test patch:
diff --git a/pandas/tests/sparse/frame/test_to_csv.py b/pandas/tests/sparse/frame/test_to_csv.py
new file mode 100644
--- /dev/null
+++ b/pandas/tests/sparse/frame/test_to_csv.py
@@ -0,0 +1,20 @@
+import numpy as np
+import pytest
+from pandas import SparseDataFrame, read_csv
+from pandas.util import testing as tm
+
+
+class TestSparseDataFrameToCsv(object):
+    fill_values = [np.nan, 0, None, 1]
+
+    @pytest.mark.parametrize('fill_value', fill_values)
+    def test_to_csv_sparse_dataframe(self, fill_value):
+        # GH19384
+        sdf = SparseDataFrame({'a': type(self).fill_values},
+                              default_fill_value=fill_value)
+
+        with tm.ensure_clean('sparse_df.csv') as path:
+            sdf.to_csv(path, index=False)
+            df = read_csv(path, skip_blank_lines=False)
+
+            tm.assert_sp_frame_equal(df.to_sparse(fill_value=fill_value), sdf)
Repository: pandas-dev/pandas

Issue:
Build no longer caching lib.pyx
I think this is a fairly recent phenomenon.  `setup.py build_ext --inplace` is now taking 40-60 seconds even if nothing has changed since the last run.  It looks like lib.pyx is getting re-cythonized on each run.


Discussion:
yes this seems very recent
Looks like it was introduced in #19306.
setup.lib_depends still has 'reduce' in it.  PR coming up to delete it, fixes this locally.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -416,7 +416,7 @@ def get_tag(self):
     cmdclass['build_src'] = DummyBuildSrc
     cmdclass['build_ext'] = CheckingBuildExt
 
-lib_depends = ['reduce', 'inference']
+lib_depends = ['inference']
 
 
 def srcpath(name=None, suffix='.pyx', subdir='src'):
@@ -508,11 +508,12 @@ def pxd(name):
         'sources': ['pandas/_libs/src/parser/tokenizer.c',
                     'pandas/_libs/src/parser/io.c']},
     '_libs.reduction': {
-        'pyxfile': '_libs/reduction'},
+        'pyxfile': '_libs/reduction',
+        'pxdfiles': ['_libs/src/util']},
     '_libs.tslibs.period': {
         'pyxfile': '_libs/tslibs/period',
         'pxdfiles': ['_libs/src/util',
-                     '_libs/lib',
+                     '_libs/missing',
                      '_libs/tslibs/timedeltas',
                      '_libs/tslibs/timezones',
                      '_libs/tslibs/nattype'],


Test patch:
Repository: pandas-dev/pandas

Issue:
PERF: improve perf of variable window rolling_min/max
The variable window implementation of rolling max/min
is O(n x w) rather than amortized O(n) with a deque
based algorithm

[here](https://stackoverflow.com/questions/12239042/spoj-arraysub-on-complexity-approach/12239580#12239580) is a possibility
we could easily use the cython c++ impl of deque. [here](https://stackoverflow.com/a/48593365/644898) is a suggestion to use a heap.


Discussion:

Resolving patch:
diff --git a/asv_bench/benchmarks/rolling.py b/asv_bench/benchmarks/rolling.py
--- a/asv_bench/benchmarks/rolling.py
+++ b/asv_bench/benchmarks/rolling.py
@@ -16,12 +16,26 @@ class Methods(object):
 
     def setup(self, constructor, window, dtype, method):
         N = 10**5
-        arr = np.random.random(N).astype(dtype)
+        arr = (100 * np.random.random(N)).astype(dtype)
         self.roll = getattr(pd, constructor)(arr).rolling(window)
 
     def time_rolling(self, constructor, window, dtype, method):
         getattr(self.roll, method)()
 
+class VariableWindowMethods(Methods):
+    sample_time = 0.2
+    params = (['DataFrame', 'Series'],
+              ['50s', '1h', '1d'],
+              ['int', 'float'],
+              ['median', 'mean', 'max', 'min', 'std', 'count', 'skew', 'kurt',
+               'sum'])
+    param_names = ['contructor', 'window', 'dtype', 'method']
+
+    def setup(self, constructor, window, dtype, method):
+        N = 10**5
+        arr = (100 * np.random.random(N)).astype(dtype)
+        index = pd.date_range('2017-01-01', periods=N, freq='5s')
+        self.roll = getattr(pd, constructor)(arr, index=index).rolling(window)
 
 class Pairwise(object):
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -617,7 +617,8 @@ def pxd(name):
         'pyxfile': '_libs/testing'},
     '_libs.window': {
         'pyxfile': '_libs/window',
-        'pxdfiles': ['_libs/skiplist', '_libs/src/util']},
+        'pxdfiles': ['_libs/skiplist', '_libs/src/util'],
+        'language': 'c++'},
     '_libs.writers': {
         'pyxfile': '_libs/writers',
         'pxdfiles': ['_libs/src/util']},
@@ -640,11 +641,11 @@ def pxd(name):
                     sources=sources,
                     depends=data.get('depends', []),
                     include_dirs=include,
+                    language=data.get('language', 'c'),
                     extra_compile_args=extra_compile_args)
 
     extensions.append(obj)
 
-
 # ----------------------------------------------------------------------
 # msgpack
 


Test patch:
Repository: pandas-dev/pandas

Issue:
CLN: Returned dtype of `_get_cython_function` unused
Minor code cleanup opportunity here. `_get_cython_function` in `core/groupby` returns a tuple containing a function and a `dtype_str`. While the latter is unpacked, it never appears to be used in code that calls it.

https://github.com/pandas-dev/pandas/blob/93c86aa13e1b7816c762b4ff372aef80a7830af8/pandas/core/groupby.py#L2243

As an alternate to removing it, it may serve some purpose if the below line is refactored to use it rather than creating its own local variable, but unless there's some other purposes I'd still just suggest cleaning up the `_get_cython_function` itself

https://github.com/pandas-dev/pandas/blob/93c86aa13e1b7816c762b4ff372aef80a7830af8/pandas/core/groupby.py#L2318


Discussion:
cleaning welcome! yeah the dtype_str is prob not needed

Resolving patch:
diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py
--- a/pandas/core/groupby.py
+++ b/pandas/core/groupby.py
@@ -2240,7 +2240,7 @@ def wrapper(*args, **kwargs):
             raise NotImplementedError("function is not implemented for this"
                                       "dtype: [how->%s,dtype->%s]" %
                                       (how, dtype_str))
-        return func, dtype_str
+        return func
 
     def _cython_operation(self, kind, values, how, axis, min_count=-1):
         assert kind in ['transform', 'aggregate']
@@ -2304,12 +2304,12 @@ def _cython_operation(self, kind, values, how, axis, min_count=-1):
             values = values.astype(object)
 
         try:
-            func, dtype_str = self._get_cython_function(
+            func = self._get_cython_function(
                 kind, how, values, is_numeric)
         except NotImplementedError:
             if is_numeric:
                 values = _ensure_float64(values)
-                func, dtype_str = self._get_cython_function(
+                func = self._get_cython_function(
                     kind, how, values, is_numeric)
             else:
                 raise


Test patch:
Repository: pandas-dev/pandas

Issue:
Ambiguous description in pandas.DataFrame.to_parquet documentation
#### Relevant Docstring

In the verson 0.22.0 [pandas.DataFrame.to_parquet documentation](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_parquet.html), the **engine** kwarg is described as:
>"Parquet reader library to use. If ‘auto’, then the option ‘io.parquet.engine’ is used. If ‘auto’, then the first library to be installed is used."

The two descriptions of "auto" are in conflict, so the one that isn't correct should be removed.



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
@@ -1678,9 +1678,10 @@ def to_parquet(self, fname, engine='auto', compression='snappy',
         fname : str
             string file path
         engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
-            Parquet reader library to use. If 'auto', then the option
-            'io.parquet.engine' is used. If 'auto', then the first
-            library to be installed is used.
+            Parquet library to use. If 'auto', then the option
+            ``io.parquet.engine`` is used. The default ``io.parquet.engine``
+            behavior is to try 'pyarrow', falling back to 'fastparquet' if
+            'pyarrow' is unavailable.
         compression : {'snappy', 'gzip', 'brotli', None}, default 'snappy'
             Name of the compression to use. Use ``None`` for no compression.
         kwargs
diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py
--- a/pandas/io/parquet.py
+++ b/pandas/io/parquet.py
@@ -244,9 +244,10 @@ def to_parquet(df, path, engine='auto', compression='snappy', **kwargs):
     path : string
         File path
     engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
-        Parquet reader library to use. If 'auto', then the option
-        'io.parquet.engine' is used. If 'auto', then the first
-        library to be installed is used.
+        Parquet library to use. If 'auto', then the option
+        ``io.parquet.engine`` is used. The default ``io.parquet.engine``
+        behavior is to try 'pyarrow', falling back to 'fastparquet' if
+        'pyarrow' is unavailable.
     compression : {'snappy', 'gzip', 'brotli', None}, default 'snappy'
         Name of the compression to use. Use ``None`` for no compression.
     kwargs
@@ -271,9 +272,10 @@ def read_parquet(path, engine='auto', columns=None, **kwargs):
 
         .. versionadded 0.21.1
     engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
-        Parquet reader library to use. If 'auto', then the option
-        'io.parquet.engine' is used. If 'auto', then the first
-        library to be installed is used.
+        Parquet library to use. If 'auto', then the option
+        ``io.parquet.engine`` is used. The default ``io.parquet.engine``
+        behavior is to try 'pyarrow', falling back to 'fastparquet' if
+        'pyarrow' is unavailable.
     kwargs are passed to the engine
 
     Returns


Test patch: