Skip to content

Commit 2e21e71

Browse files
author
Marco Gorelli
committed
Merge remote-tracking branch 'upstream/main' into pr/nikitaved-qssummer/format_iso
2 parents 8fede1f + cb42e05 commit 2e21e71

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

doc/source/development/contributing_environment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To test out code changes, you'll need to build pandas from source, which
1010
requires a C/C++ compiler and Python environment. If you're making documentation
1111
changes, you can skip to :ref:`contributing to the documentation <contributing_documentation>` but if you skip
1212
creating the development environment you won't be able to build the documentation
13-
locally before pushing your changes.
13+
locally before pushing your changes. It's recommended to also install the :ref:`pre-commit hooks <contributing.pre-commit>`.
1414

1515
.. contents:: Table of contents:
1616
:local:

pandas/core/tools/datetimes.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -785,15 +785,7 @@ def to_datetime(
785785
`strftime documentation
786786
<https://docs.python.org/3/library/datetime.html
787787
#strftime-and-strptime-behavior>`_ for more information on choices, though
788-
note the following differences:
789-
790-
- :const:`"%f"` will parse all the way
791-
up to nanoseconds;
792-
793-
- :const:`"%S"` without :const:`"%f"` will capture all the way
794-
up to nanoseconds if present as decimal places, and will also handle
795-
the case where the number of seconds is an integer.
796-
788+
note that :const:`"%f"` will parse all the way up to nanoseconds.
797789
exact : bool, default True
798790
Control how `format` is used:
799791
@@ -972,13 +964,6 @@ def to_datetime(
972964
... format='%Y-%m-%d %H:%M:%S.%f')
973965
Timestamp('2018-10-26 12:00:00.000000001')
974966
975-
:const:`"%S"` without :const:`"%f"` will capture all the way
976-
up to nanoseconds if present as decimal places.
977-
978-
>>> pd.to_datetime('2017-03-22 15:16:45.433502912',
979-
... format='%Y-%m-%d %H:%M:%S')
980-
Timestamp('2017-03-22 15:16:45.433502912')
981-
982967
**Non-convertible date/times**
983968
984969
If a date does not meet the `timestamp limitations

0 commit comments

Comments
 (0)