diff --git a/docs/reference/decorators/with_columns.rst b/docs/reference/decorators/with_columns.rst index 9dbbb7b1f..fd9918714 100644 --- a/docs/reference/decorators/with_columns.rst +++ b/docs/reference/decorators/with_columns.rst @@ -2,10 +2,10 @@ with_columns ======================= -Pandas --------------- +We support the `with_columns` operation that appends the results as new columns to the original dataframe for several libraries: -We have a ``with_columns`` option to run operations on columns of a Pandas dataframe and append the results as new columns. +Pandas +----------------------- **Reference Documentation** @@ -13,6 +13,24 @@ We have a ``with_columns`` option to run operations on columns of a Pandas dataf :special-members: __init__ +Polar (Eager) +----------------------- + +**Reference Documentation** + +.. autoclass:: hamilton.plugins.h_polars.with_columns + :special-members: __init__ + + +Polars (Lazy) +----------------------- + +**Reference Documentation** + +.. autoclass:: hamilton.plugins.h_polars_lazyframe.with_columns + :special-members: __init__ + + PySpark -------------- diff --git a/examples/pandas/with_columns/README b/examples/pandas/with_columns/README index 95cad3cfe..53a422d5a 100644 --- a/examples/pandas/with_columns/README +++ b/examples/pandas/with_columns/README @@ -2,6 +2,6 @@ We show the ability to use the familiar `with_columns` from either `pyspark` or `polars` on a Pandas dataframe. -To see the example look at the notebook. +To see the example look at the [notebook](notebook.ipynb). ![image info](./dag.png) diff --git a/examples/polars/with_columns/README b/examples/polars/with_columns/README index 86db77204..385ef5fb7 100644 --- a/examples/polars/with_columns/README +++ b/examples/polars/with_columns/README @@ -1,8 +1,8 @@ # Using with_columns with Polars -We show the ability to use the familiar `with_columns` from `polars`. Supported for both `pl.DataFrame` and `pl.LazyFrame`. +We show the ability to use the familiar `with_columns` from `polars`. Supported for both: `pl.DataFrame` and `pl.LazyFrame`. -To see the example look at the notebook. +To see the example look at the [notebook](notebook.ipynb). ![image info](./DAG_DataFrame.png) ![image info](./DAG_lazy.png) diff --git a/hamilton/function_modifiers/README b/hamilton/function_modifiers/README index 30cb9607b..d826e29e9 100644 --- a/hamilton/function_modifiers/README +++ b/hamilton/function_modifiers/README @@ -1,6 +1,8 @@ # with_columns_base -Documenting the current design flow for the `with_columns` decorator. It belongs to the `NodeInjector` lifecycle. +Documenting the current design flow for the `with_columns` decorator. + +For now, it belongs to the `NodeInjector` lifecycle since it still runs the decorated function as a node but injects the dataframe with columns appended columns as one of the parameters. The `with_columns` consists of three parts that are represented in the corresponding three abstract methods in `with_columns_base`: