diff --git a/__init__.py b/__init__.py index dc92201..ca1030b 100644 --- a/__init__.py +++ b/__init__.py @@ -52,6 +52,7 @@ from .modules.pandas_wrapper.pandas_mul import PandasMul from .modules.pandas_wrapper.pandas_mul_series import PandasMulSeries from .modules.pandas_wrapper.pandas_pow import PandasPow from .modules.pandas_wrapper.pandas_pow_series import PandasPowSeries +from .modules.pandas_wrapper.pandas_rename import PandasRename from .modules.pandas_wrapper.pandas_replace import PandasReplace from .modules.pandas_wrapper.pandas_save_csv import PandasSaveCSV from .modules.pandas_wrapper.pandas_save_json import PandasSaveJSON @@ -127,6 +128,7 @@ NODE_CLASS_MAPPINGS: Dict[str, Type[T]] = { "PandasMode": PandasMode, "PandasMul": PandasMul, "PandasMulSeries": PandasMulSeries, + "PandasRename": PandasRename, "PandasReplace": PandasReplace, "PandasPow": PandasPow, "PandasPowSeries": PandasPowSeries, @@ -209,6 +211,7 @@ NODE_DISPLAY_NAME_MAPPINGS: Dict[str, str] = { "PandasMulSeries": "Pandas Mul Series", "PandasPow": "Pandas Pow", "PandasPowSeries": "Pandas Pow Series", + "PandasRename": "Pandas Rename", "PandasReplace": "Pandas Replace", "PandasSaveCSV": "Pandas Save CSV", "PandasSaveJSON": "Pandas Save JSON", diff --git a/docs/reference/node_reference.md b/docs/reference/node_reference.md index 1021df3..a787df0 100644 --- a/docs/reference/node_reference.md +++ b/docs/reference/node_reference.md @@ -105,6 +105,7 @@ | [Pandas Horizontal Concat](pandas_horizontal_concat.md) | Horizontally concatenates two pandas DataFrames. | | [Pandas Horizontal Split](pandas_horizontal_split.md) | Horizontally splits a Pandas DataFrame into two pandas DataFrames. | | [Pandas Join](pandas_join.md) | Merges two pandas DataFrames based on a common column. | +| [Pandas Rename](pandas_rename.md) | Renames an index (row label) or a column label. | | [Pandas Sort](pandas_sort.md) | Sorts a pandas DataFrame by a specified column. | | [Pandas Vertical Concat](pandas_vertical_concat.md) | Vertically concatenates two pandas DataFrames. | | [Pandas Vertical Split](pandas_vertical_split.md) | Vertically splits a Pandas DataFrame into two pandas DataFrames. | diff --git a/docs/reference/pandas_rename.md b/docs/reference/pandas_rename.md new file mode 100644 index 0000000..70f119f --- /dev/null +++ b/docs/reference/pandas_rename.md @@ -0,0 +1,20 @@ +# Pandas Rename +Renames an index (row label) or a column label. + +## Input +| Name | Data type | +|---|---| +| dataframe | DataFrame | +| axis | DataFrame | +| current_label | String | +| new_label | | + +## Output +| Data type | +|---| +| DataFrame | + +