Skip to content

Commit 8d41537

Browse files
committed
updated definition table
1 parent c00d1d2 commit 8d41537

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

doc/source/user_guide/user_defined_functions.rst

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,23 @@ Methods that support User-Defined Functions
8787

8888
User-Defined Functions can be applied across various pandas methods:
8989

90-
+-------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
91-
| Method | Function Input | Function Output | Description |
92-
+===================+========================+==========================+===========================================================================+
93-
| map | Scalar | Scalar | Maps each element to the element returned by the function element-wise |
94-
| apply (axis=0) | Column (Series) | Column (Series) | Apply a function to each column |
95-
| apply (axis=1) | Row (Series) | Row (Series) | Apply a function to each row |
96-
| agg | Series/DataFrame | Scalar or Series | Aggregate and summarizes values, e.g., sum or custom reducer |
97-
| transform | Series/DataFrame | Same shape as input | Transform values while preserving shape |
98-
| filter | Series/DataFrame | Series/DataFrame | Filter data using a boolean array |
99-
| pipe | Series/DataFrame | Series/DataFrame | Chain UDFs together to apply to Series or Dataframe |
100-
+-------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
90+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
91+
| Method | Function Input | Function Output | Description |
92+
+============================+========================+==========================+===========================================================================+
93+
| :meth:`map` | Scalar | Scalar | Maps each element to the element returned by the function element-wise |
94+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
95+
| :meth:`apply` (axis=0) | Column (Series) | Column (Series) | Apply a function to each column |
96+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
97+
| :meth:`apply` (axis=1) | Row (Series) | Row (Series) | Apply a function to each row |
98+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
99+
| :meth:`agg` | Series/DataFrame | Scalar or Series | Aggregate and summarizes values, e.g., sum or custom reducer |
100+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
101+
| :meth:`transform` | Series/DataFrame | Same shape as input | Transform values while preserving shape |
102+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
103+
| :meth:`filter` | Series/DataFrame | Series/DataFrame | Filter data using a boolean array |
104+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
105+
| :meth:`pipe` | Series/DataFrame | Series/DataFrame | Chain UDFs together to apply to Series or Dataframe |
106+
+----------------------------+------------------------+--------------------------+---------------------------------------------------------------------------+
101107

102108
.. note::
103109
Some of these methods are can also be applied to groupby, resample, and various window objects.

0 commit comments

Comments
 (0)