prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Deprecate functions ?
  Central point to discuss functions to deprecate, if any?
  
  - [x] `process_text` - `transform_columns` covers this very well
  - [x]  `impute` vs `fill_empty` - `impute` has the advantage of extra statistics functions (mean, mode, ...)
  - [x] `rename_columns` - use pandas `rename`
  - [x] `rename_column` - use `pd.rename`
  - [x] `remove_columns` - use `pd.drop` or `select`
  - [x] `filter_on` - use `query` or `select`
  - [x] `fill_direction` - use `transform_columns` or `pd.DataFrame.assign`
  - [x] `groupby_agg` - use `transform_columns` - once `by` is implemented
  - [x] `then` - use `pd.DataFrame.pipe`
  - [x] `to_datetime` - use `jn.transform_columns`
  - [x] `pivot_wider` - use `pd.DataFrame.pivot`
  
  </issue>
  <code>
  [start of janitor/functions/then.py]
  1 """Implementation source for `then`."""
  2 from typing import Callable
  3 import pandas_flavor as pf
  4 import pandas as pd
  5 
  6 
  7 @pf.register_dataframe_method
  8 def then(df: pd.DataFrame, func: Callable) -> pd.DataFrame:
  9     """Add an arbitrary function to run in the `pyjanitor` method chain.
  10 
  11     This method does not mutate the original DataFrame.
  12 
  13     Examples:
  14         A trivial example using a lambda `func`.
  15 
  16         >>> import pandas as pd
  17         >>> import janitor
  18         >>> (pd.DataFrame({"a": [1, 2, 3], "b": [7, 8, 9]})
  19         ...  .then(lambda df: df * 2))
  20            a   b
  21         0  2  14
  22         1  4  16
  23         2  6  18
  24 
  25     Args:
  26         df: A pandas DataFrame.
  27         func: A function you would like to run in the method chain.
  28             It should take one parameter and return one parameter, each being
  29             the DataFrame object. After that, do whatever you want in the
  30             middle. Go crazy.
  31 
  32     Returns:
  33         A pandas DataFrame.
  34     """
  35     df = func(df)
  36     return df
  37
  [end of janitor/functions/then.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/janitor/functions/then.py b/janitor/functions/then.py
  --- a/janitor/functions/then.py
  +++ b/janitor/functions/then.py
  @@ -2,14 +2,25 @@
   from typing import Callable
   import pandas_flavor as pf
   import pandas as pd
  +from janitor.utils import refactored_function
   
   
  +@pf.register_dataframe_method
  +@refactored_function(
  +    message="This function will be deprecated in a 1.x release. "
  +    "Kindly use `pd.DataFrame.pipe` instead."
  +)
   @pf.register_dataframe_method
   def then(df: pd.DataFrame, func: Callable) -> pd.DataFrame:
       """Add an arbitrary function to run in the `pyjanitor` method chain.
   
       This method does not mutate the original DataFrame.
   
  +    !!!note
  +
  +        This function will be deprecated in a 1.x release.
  +        Please use `pd.DataFrame.pipe` instead.
  +
       Examples:
           A trivial example using a lambda `func`.
  
verification_info: {"golden_diff": "diff --git a/janitor/functions/then.py b/janitor/functions/then.py\n--- a/janitor/functions/then.py\n+++ b/janitor/functions/then.py\n@@ -2,14 +2,25 @@\n from typing import Callable\n import pandas_flavor as pf\n import pandas as pd\n+from janitor.utils import refactored_function\n \n \n+@pf.register_dataframe_method\n+@refactored_function(\n+    message=\"This function will be deprecated in a 1.x release. \"\n+    \"Kindly use `pd.DataFrame.pipe` instead.\"\n+)\n @pf.register_dataframe_method\n def then(df: pd.DataFrame, func: Callable) -> pd.DataFrame:\n     \"\"\"Add an arbitrary function to run in the `pyjanitor` method chain.\n \n     This method does not mutate the original DataFrame.\n \n+    !!!note\n+\n+        This function will be deprecated in a 1.x release.\n+        Please use `pd.DataFrame.pipe` instead.\n+\n     Examples:\n         A trivial example using a lambda `func`.\n", "issue": "Deprecate functions ?\nCentral point to discuss functions to deprecate, if any?\r\n\r\n- [x] `process_text` - `transform_columns` covers this very well\r\n- [x]  `impute` vs `fill_empty` - `impute` has the advantage of extra statistics functions (mean, mode, ...)\r\n- [x] `rename_columns` - use pandas `rename`\r\n- [x] `rename_column` - use `pd.rename`\r\n- [x] `remove_columns` - use `pd.drop` or `select`\r\n- [x] `filter_on` - use `query` or `select`\r\n- [x] `fill_direction` - use `transform_columns` or `pd.DataFrame.assign`\r\n- [x] `groupby_agg` - use `transform_columns` - once `by` is implemented\r\n- [x] `then` - use `pd.DataFrame.pipe`\r\n- [x] `to_datetime` - use `jn.transform_columns`\r\n- [x] `pivot_wider` - use `pd.DataFrame.pivot`\n", "before_files": [{"content": "\"\"\"Implementation source for `then`.\"\"\"\nfrom typing import Callable\nimport pandas_flavor as pf\nimport pandas as pd\n\n\n@pf.register_dataframe_method\ndef then(df: pd.DataFrame, func: Callable) -> pd.DataFrame:\n    \"\"\"Add an arbitrary function to run in the `pyjanitor` method chain.\n\n    This method does not mutate the original DataFrame.\n\n    Examples:\n        A trivial example using a lambda `func`.\n\n        >>> import pandas as pd\n        >>> import janitor\n        >>> (pd.DataFrame({\"a\": [1, 2, 3], \"b\": [7, 8, 9]})\n        ...  .then(lambda df: df * 2))\n           a   b\n        0  2  14\n        1  4  16\n        2  6  18\n\n    Args:\n        df: A pandas DataFrame.\n        func: A function you would like to run in the method chain.\n            It should take one parameter and return one parameter, each being\n            the DataFrame object. After that, do whatever you want in the\n            middle. Go crazy.\n\n    Returns:\n        A pandas DataFrame.\n    \"\"\"\n    df = func(df)\n    return df\n", "path": "janitor/functions/then.py"}]}