Skip to content

Commit ef2f4c2

Browse files
committed
DOC: several minor doc improvements
1 parent a89f489 commit ef2f4c2

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

doc/source/indexing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Attribute Access
186186

187187
.. _indexing.attribute_access:
188188

189-
You may access an index on a ``Series``, column on a ``DataFrame``, and a item on a ``Panel`` directly
189+
You may access an index on a ``Series``, column on a ``DataFrame``, and an item on a ``Panel`` directly
190190
as an attribute:
191191

192192
.. ipython:: python
@@ -1513,7 +1513,7 @@ Compare these two access methods:
15131513
These both yield the same results, so which should you use? It is instructive to understand the order
15141514
of operations on these and why method 2 (``.loc``) is much preferred over method 1 (chained ``[]``)
15151515

1516-
``dfmi['one']`` selects the first level of the columns and returns a data frame that is singly-indexed.
1516+
``dfmi['one']`` selects the first level of the columns and returns a DataFrame that is singly-indexed.
15171517
Then another python operation ``dfmi_with_one['second']`` selects the series indexed by ``'second'`` happens.
15181518
This is indicated by the variable ``dfmi_with_one`` because pandas sees these operations as separate events.
15191519
e.g. separate calls to ``__getitem__``, so it has to treat them as linear operations, they happen one after another.

pandas/core/strings.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -967,13 +967,14 @@ def str_get(arr, i):
967967

968968
def str_decode(arr, encoding, errors="strict"):
969969
"""
970-
Decode character string in the Series/Index to unicode
971-
using indicated encoding. Equivalent to :meth:`str.decode`.
970+
Decode character string in the Series/Index using indicated encoding.
971+
Equivalent to :meth:`str.decode` in python2 and :meth:`bytes.decode` in
972+
python3.
972973
973974
Parameters
974975
----------
975-
encoding : string
976-
errors : string
976+
encoding : str
977+
errors : str, optional
977978
978979
Returns
979980
-------
@@ -985,13 +986,13 @@ def str_decode(arr, encoding, errors="strict"):
985986

986987
def str_encode(arr, encoding, errors="strict"):
987988
"""
988-
Encode character string in the Series/Index to some other encoding
989-
using indicated encoding. Equivalent to :meth:`str.encode`.
989+
Encode character string in the Series/Index using indicated encoding.
990+
Equivalent to :meth:`str.encode`.
990991
991992
Parameters
992993
----------
993-
encoding : string
994-
errors : string
994+
encoding : str
995+
errors : str, optional
995996
996997
Returns
997998
-------

pandas/tools/merge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ def concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False,
792792
If True, do not use the index values along the concatenation axis. The
793793
resulting axis will be labeled 0, ..., n - 1. This is useful if you are
794794
concatenating objects where the concatenation axis does not have
795-
meaningful indexing information. Note the the index values on the other
795+
meaningful indexing information. Note the index values on the other
796796
axes are still respected in the join.
797797
copy : boolean, default True
798798
If False, do not copy data unnecessarily

0 commit comments

Comments
 (0)