From a9b33364f10536bdf52824fb621af24ef547b6ad Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 25 Aug 2020 16:40:22 +0200 Subject: [PATCH] DOC: avoid StorageOptions type alias in docstrings --- pandas/io/excel/_base.py | 4 ++-- pandas/io/excel/_odfreader.py | 2 +- pandas/io/excel/_openpyxl.py | 2 +- pandas/io/excel/_pyxlsb.py | 2 +- pandas/io/excel/_xlrd.py | 2 +- pandas/io/feather_format.py | 12 ++++++++++-- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index aaef71910c9ab..3cd0d721bbdc6 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -200,13 +200,13 @@ 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. -storage_options : StorageOptions +storage_options : dict, optional Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc., if using a URL that will be parsed by ``fsspec``, e.g., starting "s3://", "gcs://". An error will be raised if providing this argument with a local path or a file-like buffer. See the fsspec and backend storage implementation - docs for the set of allowed keys and values + docs for the set of allowed keys and values. .. versionadded:: 1.2.0 diff --git a/pandas/io/excel/_odfreader.py b/pandas/io/excel/_odfreader.py index a6cd8f524503b..6cbca59aed97e 100644 --- a/pandas/io/excel/_odfreader.py +++ b/pandas/io/excel/_odfreader.py @@ -18,7 +18,7 @@ class _ODFReader(_BaseExcelReader): ---------- filepath_or_buffer : string, path to be parsed or an open readable stream. - storage_options : StorageOptions + storage_options : dict, optional passed to fsspec for appropriate URLs (see ``get_filepath_or_buffer``) """ diff --git a/pandas/io/excel/_openpyxl.py b/pandas/io/excel/_openpyxl.py index 73239190604db..c2730536af8a3 100644 --- a/pandas/io/excel/_openpyxl.py +++ b/pandas/io/excel/_openpyxl.py @@ -479,7 +479,7 @@ def __init__( ---------- filepath_or_buffer : string, path object or Workbook Object to be parsed. - storage_options : StorageOptions + storage_options : dict, optional passed to fsspec for appropriate URLs (see ``get_filepath_or_buffer``) """ import_optional_dependency("openpyxl") diff --git a/pandas/io/excel/_pyxlsb.py b/pandas/io/excel/_pyxlsb.py index c0e281ff6c2da..c15a52abe4d53 100644 --- a/pandas/io/excel/_pyxlsb.py +++ b/pandas/io/excel/_pyxlsb.py @@ -19,7 +19,7 @@ def __init__( ---------- filepath_or_buffer : str, path object, or Workbook Object to be parsed. - storage_options : StorageOptions + storage_options : dict, optional passed to fsspec for appropriate URLs (see ``get_filepath_or_buffer``) """ import_optional_dependency("pyxlsb") diff --git a/pandas/io/excel/_xlrd.py b/pandas/io/excel/_xlrd.py index ff1b3c8bdb964..a7fb519af61c6 100644 --- a/pandas/io/excel/_xlrd.py +++ b/pandas/io/excel/_xlrd.py @@ -17,7 +17,7 @@ def __init__(self, filepath_or_buffer, storage_options: StorageOptions = None): ---------- filepath_or_buffer : string, path object or Workbook Object to be parsed. - storage_options : StorageOptions + storage_options : dict, optional passed to fsspec for appropriate URLs (see ``get_filepath_or_buffer``) """ err_msg = "Install xlrd >= 1.0.0 for Excel support" diff --git a/pandas/io/feather_format.py b/pandas/io/feather_format.py index 2d86fa44f22a4..fb606b5ec8aef 100644 --- a/pandas/io/feather_format.py +++ b/pandas/io/feather_format.py @@ -16,14 +16,13 @@ def to_feather(df: DataFrame, path, storage_options: StorageOptions = None, **kw ---------- df : DataFrame path : string file path, or file-like object - storage_options : dict, optional Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc., if using a URL that will be parsed by ``fsspec``, e.g., starting "s3://", "gcs://". An error will be raised if providing this argument with a local path or a file-like buffer. See the fsspec and backend storage implementation - docs for the set of allowed keys and values + docs for the set of allowed keys and values. .. versionadded:: 1.2.0 @@ -106,6 +105,15 @@ def read_feather( Whether to parallelize reading using multiple threads. .. versionadded:: 0.24.0 + storage_options : dict, optional + Extra options that make sense for a particular storage connection, e.g. + host, port, username, password, etc., if using a URL that will + be parsed by ``fsspec``, e.g., starting "s3://", "gcs://". An error + will be raised if providing this argument with a local path or + a file-like buffer. See the fsspec and backend storage implementation + docs for the set of allowed keys and values. + + .. versionadded:: 1.2.0 Returns -------