diff --git a/doc/source/r_interface.rst b/doc/source/r_interface.rst index 826d9e980538e..2207c823f43b1 100644 --- a/doc/source/r_interface.rst +++ b/doc/source/r_interface.rst @@ -56,6 +56,7 @@ appropriate pandas object (most likely a DataFrame): .. ipython:: python + :okwarning: import pandas.rpy.common as com infert = com.load_data('infert') diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 93ad2066d0e12..2b24531b2ef54 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -769,12 +769,14 @@ def str_rstrip(arr, to_strip=None): def str_wrap(arr, width, **kwargs): - """ - Wrap long strings to be formatted in paragraphs + r""" + Wrap long strings to be formatted in paragraphs. + + This method has the same keyword parameters and defaults as + :class:`textwrap.TextWrapper`. Parameters ---------- - Same keyword parameters and defaults as :class:`textwrap.TextWrapper` width : int Maximum line-width expand_tabs : bool, optional @@ -806,11 +808,11 @@ def str_wrap(arr, width, **kwargs): settings. To achieve behavior matching R's stringr library str_wrap function, use the arguments: - expand_tabs = False - replace_whitespace = True - drop_whitespace = True - break_long_words = False - break_on_hyphens = False + - expand_tabs = False + - replace_whitespace = True + - drop_whitespace = True + - break_long_words = False + - break_on_hyphens = False Examples -------- diff --git a/pandas/tseries/tools.py b/pandas/tseries/tools.py index 8430e0209fd78..ef37e003ab67f 100644 --- a/pandas/tseries/tools.py +++ b/pandas/tseries/tools.py @@ -210,10 +210,13 @@ def to_datetime(arg, errors='ignore', dayfirst=False, utc=None, box=True, Returns ------- - ret : datetime if parsing succeeded. Return type depends on input: + ret : datetime if parsing succeeded. + Return type depends on input: + - list-like: DatetimeIndex - Series: Series of datetime64 dtype - scalar: Timestamp + In case when it is not possible to return designated types (e.g. when any element of input is before Timestamp.min or after Timestamp.max) return will have datetime.datetime type (or correspoding array/Series).