Skip to content

Commit

Permalink
adopted docs for as_ -> convert and other smaller things
Browse files Browse the repository at this point in the history
  • Loading branch information
fzumstein committed Mar 4, 2016
1 parent 932a0c7 commit 48e87bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions docs/converters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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:

Expand Down Expand Up @@ -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**

Expand Down
2 changes: 1 addition & 1 deletion docs/datastructures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48e87bb

Please sign in to comment.