Skip to content

Commit 7916599

Browse files
committed
revert to old styler
1 parent ef2adcd commit 7916599

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

pandas/io/formats/style.py

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ class Styler(object):
7070
7171
Attributes
7272
----------
73-
env
74-
template
75-
loader
73+
env : Jinja2 Environment
74+
template : Jinja2 Template
75+
loader : Jinja2 Loader
7676
7777
Notes
7878
-----
@@ -107,30 +107,12 @@ class Styler(object):
107107
--------
108108
pandas.DataFrame.style
109109
"""
110-
_loader = PackageLoader("pandas", "io/formats/templates")
111-
_env = Environment(
112-
loader=_loader,
110+
loader = PackageLoader("pandas", "io/formats/templates")
111+
env = Environment(
112+
loader=loader,
113113
trim_blocks=True,
114114
)
115-
_template = _env.get_template("html.tpl")
116-
117-
@property
118-
def template(self):
119-
"""Jinja2 template
120-
121-
See :ref:`see the example notebook <style.ipynb#Subclassing>` for more
122-
"""
123-
return self._template
124-
125-
@property
126-
def loader(self):
127-
"""Jinja2 Loader to load the templates shipped with pandas"""
128-
return self._loader
129-
130-
@property
131-
def env(self):
132-
"""Jinja2 Environment with the loader for pandas' templates"""
133-
return self._env
115+
template = env.get_template("html.tpl")
134116

135117
def __init__(self, data, precision=None, table_styles=None, uuid=None,
136118
caption=None, table_attributes=None):

0 commit comments

Comments
 (0)