Skip to content

Commit 3149a1e

Browse files
Merge pull request pandas-dev#9819 from jorisvandenbossche/doc-things
DOC: fix some various doc warnings
2 parents fdfd66c + e2f2eb4 commit 3149a1e

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

doc/source/r_interface.rst

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ appropriate pandas object (most likely a DataFrame):
5656

5757

5858
.. ipython:: python
59+
:okwarning:
5960
6061
import pandas.rpy.common as com
6162
infert = com.load_data('infert')

pandas/core/strings.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -769,12 +769,14 @@ def str_rstrip(arr, to_strip=None):
769769

770770

771771
def str_wrap(arr, width, **kwargs):
772-
"""
773-
Wrap long strings to be formatted in paragraphs
772+
r"""
773+
Wrap long strings to be formatted in paragraphs.
774+
775+
This method has the same keyword parameters and defaults as
776+
:class:`textwrap.TextWrapper`.
774777
775778
Parameters
776779
----------
777-
Same keyword parameters and defaults as :class:`textwrap.TextWrapper`
778780
width : int
779781
Maximum line-width
780782
expand_tabs : bool, optional
@@ -806,11 +808,11 @@ def str_wrap(arr, width, **kwargs):
806808
settings. To achieve behavior matching R's stringr library str_wrap function, use
807809
the arguments:
808810
809-
expand_tabs = False
810-
replace_whitespace = True
811-
drop_whitespace = True
812-
break_long_words = False
813-
break_on_hyphens = False
811+
- expand_tabs = False
812+
- replace_whitespace = True
813+
- drop_whitespace = True
814+
- break_long_words = False
815+
- break_on_hyphens = False
814816
815817
Examples
816818
--------

pandas/tseries/tools.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,13 @@ def to_datetime(arg, errors='ignore', dayfirst=False, utc=None, box=True,
210210
211211
Returns
212212
-------
213-
ret : datetime if parsing succeeded. Return type depends on input:
213+
ret : datetime if parsing succeeded.
214+
Return type depends on input:
215+
214216
- list-like: DatetimeIndex
215217
- Series: Series of datetime64 dtype
216218
- scalar: Timestamp
219+
217220
In case when it is not possible to return designated types (e.g. when
218221
any element of input is before Timestamp.min or after Timestamp.max)
219222
return will have datetime.datetime type (or correspoding array/Series).

0 commit comments

Comments
 (0)