8000 ENH: make "closed" part of IntervalDtype by jbrockmendel · Pull Request #38394 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

ENH: make "closed" part of IntervalDtype #38394

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

Merged
merged 24 commits into from
Jan 10, 2021
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
747926e
ENH: make closed part of IntervalDtype
jbrockmendel Dec 7, 2020
25d5925
TST: raise on mismatched closed
jbrockmendel Nov 21, 2020
15613e6
typo fixup
jbrockmendel Nov 21, 2020
7bd2db6
pickle
jbrockmendel Dec 8, 2020
10c0225
warn on deprcated
jbrockmendel Dec 9, 2020
2a82a78
test for warnings
jbrockmendel Dec 9, 2020
1b93617
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Dec 9, 2020
f2bb5a1
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Dec 10, 2020
ded6c31
update doctests
jbrockmendel Dec 10, 2020
9816690
remove now-unnecessary _closed attr
jbrockmendel Dec 10, 2020
aae7d84
catch warnings
jbrockmendel Dec 11, 2020
b262bdc
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Dec 11, 2020
c2efb79
whatnsew
jbrockmendel Dec 11, 2020
5ef58db
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Dec 13, 2020
bf86746
test for closed mismatch
jbrockmendel Dec 14, 2020
70c7de6
test for mismatch
jbrockmendel Dec 14, 2020
517c8f1
comment
jbrockmendel Dec 14, 2020
922ce1a
mypy fixup
jbrockmendel Dec 14, 2020
82ee698
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Dec 16, 2020
e783761
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Jan 8, 2021
6e47156
Merge branch 'master' of https://github.com/pandas-dev/pandas into en…
jbrockmendel Jan 8, 2021
367feee
API: allow closed=None in IntervalDtype
jbrockmendel Jan 8, 2021
b10b0bf
revert deprecation in whatsnew
jbrockmendel Jan 8, 2021
370a843
revert warning-catching
jbrockmendel Jan 8, 2021
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
Prev Previous commit
Next Next commit
mypy fixup
  • Loading branch information
jbrockmendel committed Dec 14, 2020
commit 922ce1a0853b3204acb017c410fd95c32c07b91e
4 changes: 2 additions & 2 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,8 +1247,8 @@ def _get_common_dtype(self, dtypes: List[DtypeObj]) -> Optional[DtypeObj]:
if not all(isinstance(x, IntervalDtype) for x in dtypes):
return None

closed = dtypes[0].closed
if not all(x.closed == closed for x in dtypes):
closed = cast("IntervalDtype", dtypes[0]).closed
if not all(cast("IntervalDtype", x).closed == closed for x in dtypes):
return np.dtype(object)

from pandas.core.dtypes.cast import find_common_type
Expand Down
0