From e26b3e2e130f28f10e67304c03d6582e79912441 Mon Sep 17 00:00:00 2001 From: Konjeti Maruthi <63769209+MaruthiKo@users.noreply.github.com> Date: Sun, 29 May 2022 13:18:14 +0530 Subject: [PATCH] Required changes in documentation as #47134 If any other changes are required please let me know. --- pandas/core/tools/datetimes.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index d4d61df915acb..2528c47d36422 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -773,8 +773,14 @@ def to_datetime( format : str, default None The strftime to parse time, e.g. :const:`"%d/%m/%Y"`. Note that - :const:`"%f"` will parse all the way up to nanoseconds. See - `strftime documentation + :const:`"%S"` without :const:`"%f"` will capture fractional + seconds up to nanoseconds, Note that :const:`"%f"` will parse + up to nanoseconds. + :const:`"%S"` without :const:`"%f"` will capture up to + nanoseconds if present as decimal places, but + will also handle the case where the number of seconds is an + integer. + See `strftime documentation `_ for more information on choices. exact : bool, default True