diff --git a/pandas/core/frame.py b/pandas/core/frame.py index ef30d989dfbd2..9e1e0486d861a 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2298,7 +2298,7 @@ def to_parquet( path : str or file-like object If a string, it will be used as Root Directory path when writing a partitioned dataset. By file-like object, - we refer to objects with a write() method, such as a file handler + we refer to objects with a write() method, such as a file handle (e.g. via builtin open function) or io.BytesIO. The engine fastparquet does not accept file-like objects. diff --git a/pandas/io/feather_format.py b/pandas/io/feather_format.py index ed3cd3cefe96e..9a42b8289ab47 100644 --- a/pandas/io/feather_format.py +++ b/pandas/io/feather_format.py @@ -104,7 +104,7 @@ def read_feather( ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. columns : sequence, default None If not provided, all columns are read. diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index a0ceb18c8bd20..51bcb4acddd7e 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -393,7 +393,7 @@ def read_json( ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. orient : str Indication of expected JSON string format. diff --git a/pandas/io/orc.py b/pandas/io/orc.py index f1b1aa6a43cb5..829ff6408d86d 100644 --- a/pandas/io/orc.py +++ b/pandas/io/orc.py @@ -31,7 +31,7 @@ def read_orc( ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. columns : list, default None If not None, only these columns will be read from the file. diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py index 07f2078931687..55256c928aad9 100644 --- a/pandas/io/parquet.py +++ b/pandas/io/parquet.py @@ -255,7 +255,7 @@ def to_parquet( path : str or file-like object If a string, it will be used as Root Directory path when writing a partitioned dataset. By file-like object, - we refer to objects with a write() method, such as a file handler + we refer to objects with a write() method, such as a file handle (e.g. via builtin open function) or io.BytesIO. The engine fastparquet does not accept file-like objects. @@ -333,7 +333,7 @@ def read_parquet(path, engine: str = "auto", columns=None, **kwargs): ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto' Parquet library to use. If 'auto', then the option diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index bc622ab8c1f18..a919fa2092d62 100644 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -92,7 +92,7 @@ If you want to pass in a path object, pandas accepts any ``os.PathLike``. 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``. + a file handle (e.g. via builtin ``open`` function) or ``StringIO``. sep : str, default {_default_sep} Delimiter to use. If sep is None, the C engine cannot automatically detect the separator, but the Python parsing engine can, meaning the latter will @@ -788,7 +788,7 @@ def read_fwf( ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. colspecs : list of tuple (int, int) or 'infer'. optional A list of tuples giving the extents of the fixed-width diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 5e5a89d96f0e5..d62480baed71e 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -310,7 +310,7 @@ def read_hdf( Alternatively, pandas accepts an open :class:`pandas.HDFStore` object. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. key : object, optional The group identifier in the store. Can be omitted if the HDF file diff --git a/pandas/io/sas/sasreader.py b/pandas/io/sas/sasreader.py index 31d1a6ad471ea..893a6286f74d4 100644 --- a/pandas/io/sas/sasreader.py +++ b/pandas/io/sas/sasreader.py @@ -74,7 +74,7 @@ def read_sas( ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. format : str {'xport', 'sas7bdat'} or None If None, file format is inferred from file extension. If 'xport' or diff --git a/pandas/io/stata.py b/pandas/io/stata.py index a8af84e42918d..06afcfc83744d 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -110,7 +110,7 @@ If you want to pass in a path object, pandas accepts any ``os.PathLike``. By file-like object, we refer to objects with a ``read()`` method, - such as a file handler (e.g. via builtin ``open`` function) + such as a file handle (e.g. via builtin ``open`` function) or ``StringIO``. {_statafile_processing_params1} {_statafile_processing_params2}