diff --git a/doc/source/release.rst b/doc/source/release.rst
index b1dfff6988cc3..27e6b2e5bbb5e 100644
--- a/doc/source/release.rst
+++ b/doc/source/release.rst
@@ -59,6 +59,8 @@ pandas 0.13
- A Series of dtype ``timedelta64[ns]`` can now be divided by another
``timedelta64[ns]`` object to yield a ``float64`` dtyped Series. This
is frequency conversion.
+ - Border is not anymore hardcoded when a Dataframe is exported to
+ HTML. (:issue:`4578`)
**API Changes**
diff --git a/pandas/core/format.py b/pandas/core/format.py
index 30856d371c084..abbd452d9be56 100644
--- a/pandas/core/format.py
+++ b/pandas/core/format.py
@@ -571,7 +571,7 @@ def write_result(self, buf):
'not %s') % type(self.classes))
_classes.extend(self.classes)
- self.write('
' % ' '.join(_classes),
+ self.write('' % ' '.join(_classes),
indent)
if len(frame.columns) == 0 or len(frame.index) == 0:
diff --git a/pandas/tests/test_format.py b/pandas/tests/test_format.py
index e7a52756089cc..ce5aa56a787f1 100644
--- a/pandas/tests/test_format.py
+++ b/pandas/tests/test_format.py
@@ -387,7 +387,7 @@ def test_to_html_escaped(self):
'co>l2':{a: "",
b: ""}}
rs = pd.DataFrame(test_dict).to_html()
- xp = """
+ xp = """
|
@@ -419,7 +419,7 @@ def test_to_html_escape_disabled(self):
'co>l2': {a: "bold",
b: "bold"}}
rs = pd.DataFrame(test_dict).to_html(escape=False)
- xp = """
+ xp = """
|
@@ -451,7 +451,7 @@ def test_to_html_multiindex_sparsify_false_multi_sparse(self):
result = df.to_html()
expected = """\
-
+
|
@@ -500,7 +500,7 @@ def test_to_html_multiindex_sparsify_false_multi_sparse(self):
result = df.to_html()
expected = """\
-
+
|
@@ -557,7 +557,7 @@ def test_to_html_multiindex_sparsify(self):
df = DataFrame([[0, 1], [2, 3], [4, 5], [6, 7]], index=index)
result = df.to_html()
- expected = """
+ expected = """
|
@@ -604,7 +604,7 @@ def test_to_html_multiindex_sparsify(self):
result = df.to_html()
expected = """\
-
+
|
@@ -659,7 +659,7 @@ def test_to_html_index_formatter(self):
f = lambda x: 'abcd'[x]
result = df.to_html(formatters={'__index__': f})
expected = """\
-
+
|
@@ -1255,7 +1255,7 @@ def test_to_html_multiindex(self):
names=['CL0', 'CL1'])
df = pandas.DataFrame([list('abcd'), list('efgh')], columns=columns)
result = df.to_html(justify='left')
- expected = ('\n'
+ expected = ('\n'
' \n'
' \n'
' CL0 | \n'
@@ -1295,7 +1295,7 @@ def test_to_html_multiindex(self):
df = pandas.DataFrame([list('abcd'), list('efgh')], columns=columns)
result = df.to_html(justify='right')
- expected = ('\n'
+ expected = ('\n'
' \n'
' \n'
' | \n'
@@ -1338,7 +1338,7 @@ def test_to_html_justify(self):
'C': [223442, 0, 1]},
columns=['A', 'B', 'C'])
result = df.to_html(justify='left')
- expected = ('\n'
+ expected = ('\n'
' \n'
' \n'
' | \n'
@@ -1372,7 +1372,7 @@ def test_to_html_justify(self):
self.assertEqual(result, expected)
result = df.to_html(justify='right')
- expected = ('\n'
+ expected = ('\n'
' \n'
' \n'
' | \n'
@@ -1452,7 +1452,7 @@ def test_to_html_with_classes(self):
result = df.to_html(classes="sortable draggable")
expected = dedent("""
-