Skip to content
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

ENH: make guess_datetime_format public #55079

Merged
merged 35 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
020103a
updating init to include guess_datetime_format func
Sep 6, 2023
aa65a91
included guess_datetime_format in api
Sep 6, 2023
b6c8eb0
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 8, 2023
a9ec6a4
updated test to include guess_datetime_format method
Sep 8, 2023
c61fff3
ran pre-commit hook
Sep 8, 2023
ed6c8bf
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 9, 2023
d8c2ea1
updated latest rst doc with enhancement note
Sep 9, 2023
1087408
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 13, 2023
6f5713e
removed enhancement update
Sep 13, 2023
51b3ef1
alphabetize other-enhancement list
Sep 13, 2023
cc204f4
added guess_datetime_format
Sep 14, 2023
85456e7
updated guess_datetime_format docstring with warning sphinx directive
Sep 14, 2023
7c1ee77
fixed spelling from pre-commit hook
Sep 14, 2023
71dea87
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 14, 2023
84d9ecf
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 16, 2023
a7f619d
update guess_datetime_format docstring examples
Sep 16, 2023
b9aa8b0
fixed trailing whitespace
Sep 16, 2023
a993189
correct sphinx directive for guess_datetime_format with trailing whit…
Sep 16, 2023
3876829
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 16, 2023
a1c56cb
updated whatsnew with corrected guess_datatime_format api method string
Sep 16, 2023
6519ccb
removed extra line
Sep 18, 2023
bc77ac7
removed comment lines in example for guess_datetime_format
Sep 18, 2023
e04af8d
removed api from method call for guess_datetime_format
Sep 18, 2023
ffa5691
pre-commit hook fix for whitespace
Sep 18, 2023
382ed88
removed other guess_datetime_format
Sep 18, 2023
e4f99da
fix extra char
Sep 19, 2023
963adc1
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Sep 19, 2023
92ea6e7
fix whitespace
Sep 19, 2023
90f912b
removed toctree api
Sep 19, 2023
f4f916e
fixed conflicts
Oct 22, 2023
3000b9e
Merge remote-tracking branch 'upstream/main' into infer-datetime-54727
Oct 22, 2023
0e03f49
fixup
MarcoGorelli Oct 26, 2023
ccfd788
Merge remote-tracking branch 'upstream/main' into pr/nnlnr/infer-date…
MarcoGorelli Oct 26, 2023
16a14c1
try fixing docstring
MarcoGorelli Oct 26, 2023
0f0f7ef
add whatsnew note
MarcoGorelli Oct 26, 2023
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
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v2.1.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Bug fixes

Other
~~~~~
-
mroeschke marked this conversation as resolved.
Show resolved Hide resolved


.. ---------------------------------------------------------------------------
.. _whatsnew_211.contributors:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v2.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ enhancement2

Other enhancements
^^^^^^^^^^^^^^^^^^
- :meth:`pandas.tseries.guess_datetime_format` is now available (:issue:`54727`)
- DataFrame.apply now allows the usage of numba (via ``engine="numba"``) to JIT compile the passed function, allowing for potential speedups (:issue:`54666`)
-

.. ---------------------------------------------------------------------------
.. _whatsnew_220.notable_bug_fixes:
Expand Down
2 changes: 2 additions & 0 deletions pandas/_libs/tslibs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"is_supported_unit",
"npy_unit_to_abbrev",
"get_supported_reso",
"guess_datetime_format",
]

from pandas._libs.tslibs import dtypes # pylint: disable=import-self
Expand Down Expand Up @@ -63,6 +64,7 @@
Tick,
to_offset,
)
from pandas._libs.tslibs.parsing import guess_datetime_format
from pandas._libs.tslibs.period import (
IncompatibleFrequency,
Period,
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/tslibs/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_namespace():
"is_supported_unit",
"get_supported_reso",
"npy_unit_to_abbrev",
"guess_datetime_format",
]

expected = set(submodules + api)
Expand Down
4 changes: 3 additions & 1 deletion pandas/tseries/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Timeseries API
"""

from pandas._libs.tslibs.parsing import guess_datetime_format

from pandas.tseries import offsets
from pandas.tseries.frequencies import infer_freq

__all__ = ["infer_freq", "offsets"]
__all__ = ["infer_freq", "offsets", "guess_datetime_format"]