Skip to content

DOC: fix some various doc warnings #9819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/r_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
18 changes: 10 additions & 8 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
--------
Expand Down
5 changes: 4 additions & 1 deletion pandas/tseries/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down