File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ import warnings
2
+
3
+ warnings .warn ("Styler has been moved from pandas.formats.style.Styler"
4
+ " to pandas.io.formats.style.Styler. This shim will be"
5
+ " removed in pandas 0.21" ,
6
+ FutureWarning )
7
+ from pandas .io .formats .style import Styler # noqa
Original file line number Diff line number Diff line change @@ -747,3 +747,10 @@ def test_from_custom_template(tmpdir):
747
747
assert result .template is not Styler .template
748
748
styler = result (pd .DataFrame ({"A" : [1 , 2 ]}))
749
749
assert styler .render ()
750
+
751
+
752
+ def test_shim ():
753
+ # https://github.com/pandas-dev/pandas/pull/16059
754
+ # Remove in 0.21
755
+ with pytest .warns (FutureWarning ):
756
+ from pandas .formats .style import Styler as _styler # noqa
You can’t perform that action at this time.
0 commit comments