-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Accepts integer/float string with units and raises when unit is ambiguous (2) #23025
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 1 commit
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
ab5f7ba
Added null context manager as do_not_raise for parametrization in pyt…
7a38ecd
Added test for pure integer strings and test for strings with/without…
a65a35a
Added entry to whatsnew.
57dea1d
Changed Timedelta to raise for strings without unit.
b8cf952
WIP refactoring.
8154859
Deprecation warning when we don't have units in string numbers.
a90a992
Fixed linting.
1184b6e
Added to_timedelta test.
5e28b49
scalar case in to_timedelta checks for strings.
fafe838
Updated test with more cases for to_timedelta.
3ca0dae
All tests passing. Implemented checks on parse_timedelta_string.
8105f9c
Updated tests to avoid creating timedeltas from strings without unit.
e90a18b
Updated more tests to avoid creating timedeltas from strings without …
e0a55a8
Updated more tests to avoid creating timedeltas from strings without …
827aebf
Fixed failing test.
9bff504
Removed litle whitespace.
b6c7d45
Type specified unit as object.
9ff6ade
Removed newline.
be93e4b
Moved default unit down to more core functions.
85f0103
Fixed linting.
673ad19
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
eb7d3f8
Merge remote-tracking branch 'origin/bugfix/string-timedelta2' into b…
bb40f77
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
2e331c1
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
bada4a7
Minor typo.
8c0425a
Lint
493a14b
Using ValueError instead of Exception.
e525ec4
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
448b68a
Catching TypeError as well.
bd173a9
LINT
d16c4c5
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
1cfc729
Refactored tests, fixed little bug in array_to_timedelta64 and explai…
e559f06
Fixed unit as None (instead of ns), Fixed test.
b914950
LINT: Fixed long lines.
64a4440
LINT: Fixed long lines.
4d26474
LINT: Fixed indentation of closing bracket.
db41054
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
2f53004
Added comment.
fb40c94
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
f5e59ee
Casting unit to 'ns' if None.
e7266da
Updated documentation and issuing DeprecationWarning instead of excep…
b6a02df
Fixed linting.
694abe9
DOC: Reorganized whatsnew
4d86ae1
CLN: Minor refactoring.
40b09f4
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
a9c4675
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
95302de
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
661fd70
Merge remote-tracking branch 'upstream/master' into bugfix/string-tim…
80a1161
Added default value to func declaration.
dbe8fae
Fixed bug in warning string.
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
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.
@jbrockmendel just explaining some changes to previous code so you can review, here I am leaving unit untouched if
None
because I thought was better only to do "nanoseconds ifNone
" in the functions in the very end of the chain (where it is impossible to proceed without having something for units), not in the intermediate ones like this one here. This is becauseNone
is a perfectly valid state (user did not provide units) and we want to preserve it as long as possible to ensure correct behaviour through the whole process.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.
yes this is ok, can you add a comment