From 48e87bb6d6022105c973e3219254357c36191461 Mon Sep 17 00:00:00 2001 From: Felix Zumstein Date: Fri, 4 Mar 2016 10:36:57 +0100 Subject: [PATCH] adopted docs for as_ -> convert and other smaller things --- docs/converters.rst | 12 ++++++------ docs/datastructures.rst | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/converters.rst b/docs/converters.rst index 650d2493f..72eb203ce 100644 --- a/docs/converters.rst +++ b/docs/converters.rst @@ -7,7 +7,7 @@ Introduced with v0.7.0, converters define how Excel ranges and their values are **reading** and **writing** operations. They also provide a consistent experience across **xlwings.Range** objects and **User Defined Functions** (UDFs). -Converters are explicitely set with the ``as_`` argument in the ``options`` method when manipulating ``xlwings.Range`` objects +Converters are explicitely set in the ``options`` method when manipulating ``xlwings.Range`` objects or in the ``@xw.arg`` and ``@xw.ret`` decorators when using UDFs. If no converter is specified, the default converter is applied when reading. When writing, xlwings will automatically apply the correct converter (if available) according to the object's type that is being written to Excel. If no converter is found for that type, it falls back to the default converter. @@ -17,8 +17,8 @@ object's type that is being written to Excel. If no converter is found for that ============================== =========================================================== =========== **** **Range** **UDF** ============================== =========================================================== =========== -**reading** ``Range.options(as_=None, **kwargs).value`` ``@arg('x', as_=None, **kwargs)`` -**writing** ``Range.options(as_=None, **kwargs).value = myvalue`` ``@ret(as_=None, **kwargs)`` +**reading** ``Range.options(convert=None, **kwargs).value`` ``@arg('x', convert=None, **kwargs)`` +**writing** ``Range.options(convert=None, **kwargs).value = myvalue`` ``@ret(convert=None, **kwargs)`` ============================== =========================================================== =========== .. note:: Keyword arguments (``kwargs``) may refer to the specific converter or the default converter. @@ -27,8 +27,8 @@ object's type that is being written to Excel. If no converter is found for that Range('A1:C3').options(pd.DataFrame, index=False, numbers=int).value -Base Converter --------------- +Default Converter +----------------- If no options are set, the following conversions are performed: @@ -77,7 +77,7 @@ The following options can be set: # all numbers in x arrive as int return x - Note that this option can only be used for reading, as Excel always stores numbers internally as floats. + **Note:** Excel always stores numbers internally as floats. * **dates** diff --git a/docs/datastructures.rst b/docs/datastructures.rst index de6dc080e..4d70f70d4 100644 --- a/docs/datastructures.rst +++ b/docs/datastructures.rst @@ -109,7 +109,7 @@ NumPy arrays ------------ NumPy arrays work similar to nested lists. However, empty cells are represented by ``nan`` instead of -``None``. If you want to read in a Range as array, set the ``as_`` argument in ``options`` to ``np.array``: +``None``. If you want to read in a Range as array, set ``convert=np.array``: .. code-block:: python