From 02e849ce9be40807f11744b58231781be4467a71 Mon Sep 17 00:00:00 2001 From: Eric Ma Date: Wed, 18 Jul 2018 12:16:41 -0400 Subject: [PATCH] Add "return method" --- pandas_flavor/register.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pandas_flavor/register.py b/pandas_flavor/register.py index 80c7fdb..d8c20e7 100644 --- a/pandas_flavor/register.py +++ b/pandas_flavor/register.py @@ -19,7 +19,7 @@ def print_column(df, col): def inner(*args, **kwargs): class AccessorMethod(object): - + def __init__(self, pandas_obj): self._obj = pandas_obj @@ -30,6 +30,8 @@ def __call__(self, *args, **kwargs): register_dataframe_accessor(method.__name__)(AccessorMethod) + return method + return inner() @@ -50,4 +52,6 @@ def __call__(self, *args, **kwargs): register_series_accessor(method.__name__)(AccessorMethod) + return method + return inner()