Skip to content

Minor doc issue in to_parquet(engine='auto') #18156

Closed
@max-sixty

Description

@max-sixty

Code Sample, a copy-pastable example if possible

In [7]: pd.DataFrame.to_parquet?
Signature: pd.DataFrame.to_parquet(self, fname, engine='auto', compression='snappy', **kwargs)
Docstring:
Write a DataFrame to the binary parquet format.

.. versionadded:: 0.21.0

Parameters
----------
fname : str
    string file path
engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto' <--- here

but with auto:

In [9]: pd.DataFrame([1,2,3]).to_parquet('f', engine='auto')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-9-057ba592ccd7> in <module>()
----> 1 pd.DataFrame([1,2,3]).to_parquet('f', engine='auto')

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/core/frame.py in to_parquet(self, fname, engine, compression, **kwargs)
   1647         from pandas.io.parquet import to_parquet
   1648         to_parquet(self, fname, engine,
-> 1649                    compression=compression, **kwargs)
   1650
   1651     @Substitution(header='Write out the column names. If a list of strings '

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/io/parquet.py in to_parquet(df, path, engine, compression, **kwargs)
    140     """
    141
--> 142     impl = get_engine(engine)
    143
    144     if not isinstance(df, DataFrame):

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas/io/parquet.py in get_engine(engine)
     27
     28     if engine not in ['pyarrow', 'fastparquet']:
---> 29         raise ValueError("engine must be one of 'pyarrow', 'fastparquet'")
     30
     31     if engine == 'pyarrow':

ValueError: engine must be one of 'pyarrow', 'fastparquet'

Problem description

Either allow auto or don't have it in the docs & default

Expected Output

Output of pd.show_versions()

In [10]: pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Darwin
OS-release: 17.2.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: 3.2.3
pip: 9.0.1
setuptools: 36.5.0
Cython: 0.27.1
numpy: 1.13.3
scipy: 0.19.1
pyarrow: None
xarray: 0.10.0rc1-2-gf83361c
IPython: 6.2.1
sphinx: None
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: None
numexpr: 2.6.4
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: 1.3.0
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: 1.1.14
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: 0.2.0+8.g9eb9d77
pandas_datareader: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasIO Parquetparquet, feather

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions