-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[WIP] perf improvements for strftime #46116
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
Closed
Closed
Changes from 66 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
1062e50
Added the default format "%Y-%m-%d %H:%M:%S" as basic format (same as…
8d07798
Created two utils `convert_dtformat` and `get_datetime_fmt_dct` so as…
4b2380e
Fixed two pep8
6a3708e
Added new `strftime` module in tslibs, containing `convert_dtformat` …
93f0dbe
Modified `DatetimeLikeArrayMixin._format_native_types` so that it acc…
5b9dd1b
Added a `fast_strftime` argument to all formatters: `Datetime64Format…
8328feb
Added a test in `TestDatetimeFastFormatter` so that it tests performa…
9bba33b
Fixed issue in tests happening when format=None
fe8aa3b
isort
a3cadec
Fixed `BusinessHour._repr_attrs` so that it is faster too.
90c836a
Added TODO for possible improvement in timedeltas
d394a1b
Added maintenance comments concerning using Timestamp.str
460504d
Improved/fix periods handling. New c function `_period_fast_strftime`.
d700c44
Fixed period string representation %FQ%q
1a44d02
Relaxed perf test for datetimes
61ec6d6
Removed 2 useless cdefs and fixed docstring of strftime with missing …
846a0fd
Fixed issue with BusinessHour formatting
84f4c7f
Fixed _period_fast_strftime FR_QTR frequency default format, and _per…
e96fe8d
Fixed the quarter issue introduced in previous commit. Apparently the…
707a084
Improved `convert_dtformat` so that it safely escapes remaining forma…
37f15c9
`convert_dtformat` now supports periods formatting and is robust to s…
e2e2d70
Fixed api test
087425f
Attempt to fix cython related uninitialized variable "quarter" warning
98d4cb4
New `Timestamp.fast_strftime`, leveraged by `format_array_from_dateti…
93c8f93
Fixed last failing test
7b74bd2
Fixed `test_missing_public_nat_methods`
c093e86
Blackened
2685aff
Fixed doctests
2c23f48
Fixed doctest example
1e17df6
Now supporting %y (short year), %I (12h clock hour) and %p (AM/PM). N…
1c06d5e
Flake8
c582753
Added `fast_strftime` argument to the csv-related tools (`DataFrame.t…
48c5e93
`SQLiteTable` now converts time objects faster thanks to string forma…
62add6e
Fixed `_format_datetime64_dateonly` so that it now relies on `Timesta…
d92a132
Added `AM_LOCAL` and `PM_LOCAL` constants fed at initial import time …
f797a6f
Accelerated ODS writer when dates need to be written: at least one of…
76c6a2e
Merge branch 'main' of https://github.com/pandas-dev/pandas into feat…
3c9620f
Using `bool_t` instead of `bool` in type hints of core/generic.py
7b37812
isort
5c1854d
flake8 and black
17255b9
Docstring fix
12b9041
Fixed test namespace
743aad8
`AM_LOCAL` and `PM_LOCAL` are now `str` - this should fix the issue o…
cef0a69
Fixed test_format and removed the performance test, as it would fail …
ff50133
flake8 black and isort
98ae429
Added missing type hint declaration for the `fast_strftime` methods (…
64fa9de
Now catching the warnings about time zone being dropped in test durin…
c200ef1
Fixed locale-related issue: AM_LOCAL and PM_LOCAL were created at com…
cea3e07
Replaced `pytest.warns` with pandas `assert_produces_warning`
ca3a6cc
Fixed `CSVFormatter` (used in `to_csv`) so that `DatetimeIndex` or `P…
53cefd0
Fixed locale problem and improved test
0bdb9b2
isort
d981542
Reverted the mods as it appears it was not this problem
37a622c
Fixed failing test on non-en locales
ec87007
Revert "Reverted the mods as it appears it was not this problem"
98cbfca
New `LocaleSpecificDtStrings` objects are returned by `convert_strfti…
c80bbec
Removed useless argument in fast_strftime
b173dc6
Fixed #46319 by using `PyUnicode_DecodeLocale` to decode the string r…
b44c6cf
flake8 black and isort
4956ff1
black
399878a
Fixed `_format_datetime64_dateonly` used in `get_format_datetime64`. …
5b6e07e
Removed the multi-locale test as it fails on some ci targets
743106f
Fixed var init issue
44724af
Flake8
718a647
Improved `Datetime64TZFormatter` readability by replacing useless cal…
e6bb843
Flake8 fix !
272f0a2
Merge branch 'main' of https://github.com/pandas-dev/pandas into feat…
12d279c
Merge branch 'main' of https://github.com/pandas-dev/pandas into feat…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a tslibs.strftime does get implemented, that might be a good home for format_array_from_datetime