From f442645ad29c216374818f28faca89b56437b570 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 00:38:55 +0300 Subject: [PATCH 1/7] qgrid to he chain-able by pandas pandas --- qgrid/pandas_decorator.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 qgrid/pandas_decorator.py diff --git a/qgrid/pandas_decorator.py b/qgrid/pandas_decorator.py new file mode 100644 index 00000000..de0ada1d --- /dev/null +++ b/qgrid/pandas_decorator.py @@ -0,0 +1,9 @@ + +from pandas import DataFrame +from .grid import show_grid + + +def show_grid(df, **kwargs): + return show_grid(df, **kwargs) + +DataFrame.show_grid = show_grid From f140b1ca3b093d50cfb426f73b72ef272d5d8a8d Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 00:40:01 +0300 Subject: [PATCH 2/7] Update __init__.py --- qgrid/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qgrid/__init__.py b/qgrid/__init__.py index d5d62b2c..84db4792 100644 --- a/qgrid/__init__.py +++ b/qgrid/__init__.py @@ -1,5 +1,6 @@ from ._version import version_info, __version__ +from .pandas_decorator from .grid import ( enable, disable, @@ -12,6 +13,7 @@ QGridWidget ) + def _jupyter_nbextension_paths(): return [{ 'section': 'notebook', From 73cf310ba222355dba765a0f55f61b4b4900b8cf Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 08:42:56 +0300 Subject: [PATCH 3/7] Update pandas_decorator.py --- qgrid/pandas_decorator.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/qgrid/pandas_decorator.py b/qgrid/pandas_decorator.py index de0ada1d..44f92df9 100644 --- a/qgrid/pandas_decorator.py +++ b/qgrid/pandas_decorator.py @@ -1,8 +1,6 @@ - from pandas import DataFrame from .grid import show_grid - def show_grid(df, **kwargs): return show_grid(df, **kwargs) From 7b7e3d8d3cb2f09bcb5d5cfa617b1637dde6e513 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 08:44:08 +0300 Subject: [PATCH 4/7] Update __init__.py --- qgrid/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qgrid/__init__.py b/qgrid/__init__.py index 84db4792..97536663 100644 --- a/qgrid/__init__.py +++ b/qgrid/__init__.py @@ -1,6 +1,6 @@ from ._version import version_info, __version__ -from .pandas_decorator +import .pandas_decorator from .grid import ( enable, disable, From f2d621706c847a99c97f4b89a067b503533a0d2d Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 08:47:49 +0300 Subject: [PATCH 5/7] Update __init__.py --- qgrid/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qgrid/__init__.py b/qgrid/__init__.py index 97536663..03742af9 100644 --- a/qgrid/__init__.py +++ b/qgrid/__init__.py @@ -1,6 +1,6 @@ from ._version import version_info, __version__ -import .pandas_decorator +import . import pandas_decorator from .grid import ( enable, disable, From a483f581e3b7a54a8ffc0adf49825ee107979314 Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 08:49:21 +0300 Subject: [PATCH 6/7] Update __init__.py --- qgrid/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qgrid/__init__.py b/qgrid/__init__.py index 03742af9..2bc74087 100644 --- a/qgrid/__init__.py +++ b/qgrid/__init__.py @@ -1,6 +1,6 @@ from ._version import version_info, __version__ -import . import pandas_decorator +from . import pandas_decorator from .grid import ( enable, disable, From b037fa90769a707fc5c72ec4a8a3d675e58cb51d Mon Sep 17 00:00:00 2001 From: Eyal Trabelsi Date: Thu, 4 Jul 2019 08:51:36 +0300 Subject: [PATCH 7/7] Update pandas_decorator.py --- qgrid/pandas_decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qgrid/pandas_decorator.py b/qgrid/pandas_decorator.py index 44f92df9..05fd3d9c 100644 --- a/qgrid/pandas_decorator.py +++ b/qgrid/pandas_decorator.py @@ -1,7 +1,7 @@ from pandas import DataFrame from .grid import show_grid -def show_grid(df, **kwargs): +def _show_grid(df, **kwargs): return show_grid(df, **kwargs) -DataFrame.show_grid = show_grid +DataFrame.show_grid = _show_grid