From bfdca6bb5f0e414ad8f23a0a6e4f63256600aba3 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Wed, 18 Jun 2014 11:45:36 -0700 Subject: [PATCH 1/2] Remove unused variable assignment --- pandas/core/frame.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index f702714fdc37e..7d876cc4d0e29 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -470,11 +470,6 @@ def _repr_html_(self): Return a html representation for a particular DataFrame. Mainly for IPython notebook. """ - # ipnb in html repr mode allows scrolling - # users strongly prefer to h-scroll a wide HTML table in the browser - # then to get a summary view. GH3541, GH3573 - ipnbh = com.in_ipnb() and get_option('display.notebook_repr_html') - # qtconsole doesn't report it's line width, and also # behaves badly when outputting an HTML table # that doesn't fit the window, so disable it. From 77e8abd17f1ef6b5481ffe4738dfe42049516e82 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Wed, 18 Jun 2014 11:54:03 -0700 Subject: [PATCH 2/2] Add notes deprecating in_ipnb and in_qtconsole --- pandas/core/common.py | 5 +++++ pandas/core/frame.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/pandas/core/common.py b/pandas/core/common.py index 92d60ae8d8847..9fb79464d061b 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -2599,6 +2599,8 @@ def check_main(): def in_qtconsole(): """ check if we're inside an IPython qtconsole + + DEPRECATED: This is no longer needed, or working, in IPython 3 and above. """ try: ip = get_ipython() @@ -2616,6 +2618,9 @@ def in_qtconsole(): def in_ipnb(): """ check if we're inside an IPython Notebook + + DEPRECATED: This is no longer used in pandas, and won't work in IPython 3 + and above. """ try: ip = get_ipython() diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 7d876cc4d0e29..b4e69e2056507 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -473,6 +473,9 @@ def _repr_html_(self): # qtconsole doesn't report it's line width, and also # behaves badly when outputting an HTML table # that doesn't fit the window, so disable it. + # XXX: In IPython 3.x and above, the Qt console will not attempt to + # display HTML, so this check can be removed when support for IPython 2.x + # is no longer needed. if com.in_qtconsole(): # 'HTML output is disabled in QtConsole' return None