8000 REGR: fix bug in DatetimeIndex slicing with irregular or unsorted indices by CloseChoice · Pull Request #37023 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

REGR: fix bug in DatetimeIndex slic 8000 ing with irregular or unsorted indices #37023

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
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f1d4a10
remove assert in core/generic.py and add test for datetimeindex slicing
CloseChoice Oct 10, 2020
cd1a136
fix formatting in test_generic
CloseChoice Oct 10, 2020
fe478c4
fix test and remove commented line
CloseChoice Oct 10, 2020
15a9185
updated tests according to PR comments
CloseChoice Oct 10, 2020
6caba47
slice with loc to prevent future warning
CloseChoice Oct 10, 2020
5703994
revert changes in io/formats/css.py
CloseChoice Oct 10, 2020
4a7ff03
run black on test_timeseries.py
CloseChoice Oct 10, 2020
25b229c
move tests to indexing/test_partial, add whatsnew entry
CloseChoice Oct 11, 2020
9bb10fe
reformat test_timeseries.py
CloseChoice Oct 11, 2020
9d82f83
Merge branch 'master' of https://github.com/pandas-dev/pandas into BU…
CloseChoice Oct 11, 2020
968fdf4
update whatsnew
CloseChoice Oct 11, 2020
89b0248
Merge branch 'master' into BUG-regression-datetimeindex-slicing
CloseChoice Oct 16, 2020
3710514
add suggestion from comment
CloseChoice Oct 16, 2020
237b085
use result and expected in tests
CloseChoice Oct 16, 2020
43a2a26
Merge branch 'master' of https://github.com/pandas-dev/pandas into BU…
CloseChoice Oct 20, 2020
632855b
Update doc/source/whatsnew/v1.1.4.rst
CloseChoice Oct 20, 2020
e79cdac
Merge branch 'master' of https://github.com/pandas-dev/pandas into BU…
CloseChoice Oct 21, 2020
e5f3615
Merge branch 'BUG-regression-datetimeindex-slicing' of github.com:Clo…
CloseChoice Oct 21, 2020
4261f02
Merge branch 'master' of https://github.com/pandas-dev/pandas into BU…
CloseChoice Oct 22, 2020
583003e
Merge remote-tracking branch 'upstream/master' into BUG-regression-da…
simonjayhawkins Oct 26, 2020
e246520
Update pandas/tests/indexing/test_partial.py
MarcoGorelli Oct 26, 2020
9cf919e
Update pandas/tests/indexing/test_partial.py
MarcoGorelli Oct 26, 2020
7f693dc
Update pandas/tests/indexing/test_partial.py
MarcoGorelli Oct 26, 2020
02ae223
Update pandas/tests/indexing/test_partial.py
MarcoGorelli Oct 26, 2020
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
revert changes in io/formats/css.py
  • Loading branch information
CloseChoice committed Oct 10, 2020
commit 57039946a73de47f58f2cb0eb75d53eddaa76fdd
20 changes: 15 additions & 5 deletions pandas/io/formats/css.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ class CSSResolver:
SIDES = ("top", "right", "bottom", "left")

def __call__(
self, declarations_str: str, inherited: Optional[Dict[str, str]] = None,
self,
declarations_str: str,
inherited: Optional[Dict[str, str]] = None,
) -> Dict[str, str]:
"""
The given declarations to atomic properties.
Expand Down Expand Up @@ -134,7 +136,9 @@ def __call__(
return self._update_other_units(props)

def _update_initial(
self, props: Dict[str, str], inherited: Dict[str, str],
self,
props: Dict[str, str],
inherited: Dict[str, str],
) -> Dict[str, str]:
# 1. resolve inherited, initial
for prop, val in inherited.items():
Expand All @@ -154,7 +158,9 @@ def _update_initial(
return new_props

def _update_font_size(
self, props: Dict[str, str], inherited: Dict[str, str],
self,
props: Dict[str, str],
inherited: Dict[str, str],
) -> Dict[str, str]:
# 2. resolve relative font size
if props.get("font-size"):
Expand Down Expand Up @@ -182,14 +188,18 @@ def _update_other_units(self, props: Dict[str, str]) -> Dict[str, str]:
prop = f"border-{side}-width"
if prop in props:
props[prop] = self.size_to_pt(
props[prop], em_pt=font_size, conversions=self.BORDER_WIDTH_RATIOS,
props[prop],
em_pt=font_size,
conversions=self.BORDER_WIDTH_RATIOS,
)

for prop in [f"margin-{side}", f"padding-{side}"]:
if prop in props:
# TODO: support %
props[prop] = self.size_to_pt(
props[prop], em_pt=font_size, conversions=self.MARGIN_RATIOS,
props[prop],
em_pt=font_size,
conversions=self.MARGIN_RATIOS,
)
return props

Expand Down
0