-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
REF: Make PeriodArray an ExtensionArray #22862
Merged
Merged
Changes from 143 commits
Commits
Show all changes
149 commits
Select commit
Hold shift + click to select a range
eaadcbc
WIP: PeriodArray
TomAugspurger a05928a
WIP
TomAugspurger 3c0d9ee
Just moves
TomAugspurger 63fc3fa
PeriodArray.shift definition
TomAugspurger 7d5d71c
_data type
TomAugspurger e5caac6
clean
TomAugspurger c194407
accessor wip
TomAugspurger eb4506b
some more wip
TomAugspurger 1b9fd7a
tshift, shift
TomAugspurger 0fa0ed1
Arithmetic
TomAugspurger 3247ea8
repr changes
TomAugspurger c162cdd
wip
TomAugspurger 611d378
freq setter
TomAugspurger fb2ff82
Added disabled ops
TomAugspurger 25a380f
copy
TomAugspurger 1b2c4ec
Support concat
TomAugspurger d04293e
object ctor
TomAugspurger eacad39
Updates
TomAugspurger 70cd3b8
lint
TomAugspurger 9b22889
lint
TomAugspurger 87d289a
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 6369c7f
wip
TomAugspurger 01551f0
more wip
TomAugspurger 0437940
array-setitem
TomAugspurger 42ab137
wip
TomAugspurger 298390f
wip
TomAugspurger 23e5cfc
Use ._tshift internally for datetimelike ops
TomAugspurger 9d17fd2
deep
TomAugspurger 959cd72
Squashed commit of the following:
TomAugspurger b66f617
Squashed commit of the following:
TomAugspurger 5669675
fixup
TomAugspurger 2c0311c
The rest of the EA tests
TomAugspurger 012be1c
docs
TomAugspurger c3a96d0
Merge remote-tracking branch 'upstream/master' into datetimelike-tshift
TomAugspurger 67faabc
rename to time_shift
TomAugspurger ff7c06c
Squashed commit of the following:
TomAugspurger c2d57bd
Squashed commit of the following:
TomAugspurger fbde770
Squashed commit of the following:
TomAugspurger 1c4bbe7
Squashed commit of the following:
TomAugspurger b395c90
fixed merge conflict
TomAugspurger d68a5c5
Handle divmod test
TomAugspurger 0c7b704
extension tests passing
TomAugspurger d26d3d2
Squashed commit of the following:
TomAugspurger e4babea
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 7f6c144
merge conflict
TomAugspurger b4aa4ca
wip
TomAugspurger 6a70131
indexes passing
TomAugspurger 9aa077c
op names
TomAugspurger 411738c
extension, arrays passing
TomAugspurger 8e0fb69
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 6d98e85
fixup
TomAugspurger 6d9e150
lint
TomAugspurger 4899479
Fixed to_timestamp
TomAugspurger 634def1
Same error message for index, series
TomAugspurger 1f18452
Fix freq handling in to_timestamp
TomAugspurger 2f92b22
dtype update
TomAugspurger 23f232c
accept kwargs
TomAugspurger dd3b8cd
fixups
TomAugspurger 1a7c360
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 87ecb64
updates
TomAugspurger 0bde329
explicit
TomAugspurger 2d85a82
add to assert
TomAugspurger 438e6b5
wip period_array
TomAugspurger a9456fd
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger ac05365
wip period_array
TomAugspurger 36ed547
order
TomAugspurger 4652ca7
sort order
TomAugspurger a047a1b
test for hashing
TomAugspurger a4a30d7
update
TomAugspurger 1441ae6
lint
TomAugspurger 8003808
boxing
TomAugspurger 5f43753
fix fixtures
TomAugspurger 1c13d0f
infer
TomAugspurger bae6b3d
Remove seemingly unreachable code
TomAugspurger f422cf0
lint
TomAugspurger 0229d74
wip
TomAugspurger aa40cf4
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 29085e1
Updates for master
TomAugspurger 00ffddf
simplify
TomAugspurger e81fa9c
wip
TomAugspurger 0c8925f
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 96204a1
remove view
TomAugspurger 82930f7
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 8d24582
simplify
TomAugspurger 1fc7744
lint
TomAugspurger 6cd428c
Removed add_comparison_methods
TomAugspurger 21693e0
xfail op
TomAugspurger b65ffad
remove some
TomAugspurger 1f438e3
constructors
TomAugspurger f3928fb
Constructor cleanup
TomAugspurger 089f8ab
misc fixups
TomAugspurger 700650a
more xfails
TomAugspurger 452c229
typo
TomAugspurger e3e0e57
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 78751c2
Added asi8
TomAugspurger 203d561
Allow setting nan
TomAugspurger eb1c67d
revert breaking docs
TomAugspurger e08aa79
Override _add_sub_int_array
TomAugspurger c1ee04b
lint
TomAugspurger 827e563
Update PeriodIndex._simple_new
TomAugspurger ca4a7fd
Clean up uses of .values, ._values, ._ndarray_values, ._data
TomAugspurger ed185c0
one more values
TomAugspurger b3407ac
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger a4011eb
remove xfails
TomAugspurger fc1ca3c
Fixed freq handling in _shallow_copy with a freq
TomAugspurger 1b1841f
test updates
TomAugspurger b3b315a
API: Keep PeriodIndex.values an ndarray
TomAugspurger 3ab4176
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 8102475
BUG: Raise for non-equal freq in take
TomAugspurger 8c329eb
Punt on DataFrame.replace specializing
TomAugspurger 78d4960
lint
TomAugspurger 4e3d914
fixed xfail message
TomAugspurger 5e4aaa7
TST: _from_datetime64
TomAugspurger 7f77563
Fixups
TomAugspurger f88d6f7
escape
TomAugspurger 7aa78ba
dtype
TomAugspurger 2d737f8
revert and unxfail values
TomAugspurger 833899a
error catching
TomAugspurger 236b49c
isort
TomAugspurger 8230347
Avoid PeriodArray.values
TomAugspurger bf33a57
clarify _box_func usage
TomAugspurger 738acfe
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 032ec02
TST: unxfail ops tests
TomAugspurger 77e389a
Avoid use of .values
jorisvandenbossche 61031d7
__setitem__ type
TomAugspurger a094b3d
Misc cleanups
TomAugspurger ace4856
lint
TomAugspurger fc6a1c7
API: remove ordinal from period_array
TomAugspurger 900afcf
catch exception
TomAugspurger 0baa3e9
misc cleanup
TomAugspurger f95106e
Handle astype integer size
TomAugspurger e57e24a
Bump test coverage
TomAugspurger ce1c970
remove partial test
TomAugspurger a7e1216
close bracket
TomAugspurger 2548d6a
change the test
TomAugspurger 02e3863
isort
TomAugspurger 1997cff
consistent _data
TomAugspurger af2d1de
lint
TomAugspurger 64f5778
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 4151510
ndarray_values -> asi8
TomAugspurger ac9bd41
colocate ops
TomAugspurger 5462bd7
refactor PeriodIndex.item
TomAugspurger c1c6428
return NotImplemented for Series / Index
TomAugspurger 7ab2736
remove xpass
TomAugspurger bd6f966
release note
TomAugspurger 8068daf
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 5691506
types, use data
TomAugspurger 575d61a
remove ufunc xpass
TomAugspurger 4065bdb
Merge remote-tracking branch 'upstream/master' into ea-period
TomAugspurger 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 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 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 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 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 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.
I would make this a function I think as we are likely to do this in other places as well (or maybe already) do, e.g. in csv parsing with category?
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.
this is basically what
catetorical_array
(generic construtor for Categoricals should be doing anyhow)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.
This called from the categorical constructor.
Ideally we would have a single place that does all this. Right now it feels scattered over
_sanitize_array
, the Index constructor, and probably a few other places.