Skip to content

DOC: Added DataFrame in Parameters & Return description in the docstring #44007

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 4 commits into from
Oct 17, 2021
Merged
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
4 changes: 3 additions & 1 deletion pandas/core/tools/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,8 @@ def to_datetime(
Parameters
----------
arg : int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like
The object to convert to a datetime.
The object to convert to a datetime. If the DataFrame is provided, the method
expects minimally the following columns: "year", "month", "day".
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
- If 'raise', then invalid parsing will raise an exception.
- If 'coerce', then invalid parsing will be set as NaT.
Expand Down Expand Up @@ -775,6 +776,7 @@ def to_datetime(
- DatetimeIndex, if timezone naive or aware with the same timezone
- Index of object dtype, if timezone aware with mixed time offsets
- Series: Series of datetime64 dtype
- DataFrame: Series of datetime64 dtype
- scalar: Timestamp

In case when it is not possible to return designated types (e.g. when
Expand Down