Skip to content

Commit 9a29391

Browse files
authored
DOC: Added DataFrame in Parameters & Return description in the docstring (#44007)
* DOC: Added DataFrame in Parameters & Return description in the docstring * DOC: Reduced number of characters in Line 695 * DOC: removed trailing whitespaces * DOC: Removed redundant text and fixed punctuation.
1 parent 0b70818 commit 9a29391

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/tools/datetimes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,8 @@ def to_datetime(
692692
Parameters
693693
----------
694694
arg : int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like
695-
The object to convert to a datetime.
695+
The object to convert to a datetime. If the DataFrame is provided, the method
696+
expects minimally the following columns: "year", "month", "day".
696697
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
697698
- If 'raise', then invalid parsing will raise an exception.
698699
- If 'coerce', then invalid parsing will be set as NaT.
@@ -775,6 +776,7 @@ def to_datetime(
775776
- DatetimeIndex, if timezone naive or aware with the same timezone
776777
- Index of object dtype, if timezone aware with mixed time offsets
777778
- Series: Series of datetime64 dtype
779+
- DataFrame: Series of datetime64 dtype
778780
- scalar: Timestamp
779781
780782
In case when it is not possible to return designated types (e.g. when

0 commit comments

Comments
 (0)