Repository: pandas-dev/pandas

Issue:
CLN/DEPR: html.border option -> display.html.border
xref #11784
 
```
html.border : int
    A ``border=value`` attribute is inserted in the ``<table>`` tag
    for the DataFrame HTML repr.
    [default: 1] [currently: 1]
```

should migrate this (by deprecation) and moving to a new option ``display.html.border`` to keep in-line with our namespacing.


Discussion:
I'll take a look at this during SciPy 2017 sprint weekend.

Resolving patch:
diff --git a/pandas/core/config_init.py b/pandas/core/config_init.py
--- a/pandas/core/config_init.py
+++ b/pandas/core/config_init.py
@@ -202,6 +202,17 @@ def use_numexpr_cb(key):
     (default: False)
 """
 
+pc_html_border_doc = """
+: int
+    A ``border=value`` attribute is inserted in the ``<table>`` tag
+    for the DataFrame HTML repr.
+"""
+
+pc_html_border_deprecation_warning = """\
+html.border has been deprecated, use display.html.border instead
+(currently both are identical)
+"""
+
 pc_line_width_deprecation_warning = """\
 line_width has been deprecated, use display.width instead (currently both are
 identical)
@@ -381,6 +392,8 @@ def table_schema_cb(key):
                        validator=is_bool)
     cf.register_option('html.table_schema', False, pc_table_schema_doc,
                        validator=is_bool, cb=table_schema_cb)
+    cf.register_option('html.border', 1, pc_html_border_doc,
+                       validator=is_int)
 
 
 cf.deprecate_option('display.line_width',
@@ -390,16 +403,13 @@ def table_schema_cb(key):
 cf.deprecate_option('display.height', msg=pc_height_deprecation_warning,
                     rkey='display.max_rows')
 
-pc_html_border_doc = """
-: int
-    A ``border=value`` attribute is inserted in the ``<table>`` tag
-    for the DataFrame HTML repr.
-"""
-
 with cf.config_prefix('html'):
     cf.register_option('border', 1, pc_html_border_doc,
                        validator=is_int)
 
+cf.deprecate_option('html.border', msg=pc_html_border_deprecation_warning,
+                    rkey='display.html.border')
+
 
 tc_sim_interactive_doc = """
 : boolean
diff --git a/pandas/io/formats/format.py b/pandas/io/formats/format.py
--- a/pandas/io/formats/format.py
+++ b/pandas/io/formats/format.py
@@ -1064,7 +1064,7 @@ def __init__(self, formatter, classes=None, max_rows=None, max_cols=None,
                              self.max_cols < len(self.fmt.columns))
         self.notebook = notebook
         if border is None:
-            border = get_option('html.border')
+            border = get_option('display.html.border')
         self.border = border
 
     def write(self, s, indent=0):


Test patch:
diff --git a/pandas/tests/io/formats/test_to_html.py b/pandas/tests/io/formats/test_to_html.py
--- a/pandas/tests/io/formats/test_to_html.py
+++ b/pandas/tests/io/formats/test_to_html.py
@@ -1401,7 +1401,7 @@ def test_to_html_border(self):
 
     def test_to_html_border_option(self):
         df = DataFrame({'A': [1, 2]})
-        with pd.option_context('html.border', 0):
+        with pd.option_context('display.html.border', 0):
             result = df.to_html()
             assert 'border="0"' in result
             assert 'border="0"' in df._repr_html_()
@@ -1411,6 +1411,11 @@ def test_to_html_border_zero(self):
         result = df.to_html(border=0)
         assert 'border="0"' in result
 
+    def test_display_option_warning(self):
+        with tm.assert_produces_warning(DeprecationWarning,
+                                        check_stacklevel=False):
+            pd.options.html.border
+
     def test_to_html(self):
         # big mixed
         biggie = DataFrame({'A': np.random.randn(200),