@@ -92,7 +92,7 @@ that cannot be achieved with built-in pandas functions.
92
92
When to use: :meth: `DataFrame.apply ` is suitable when no alternative vectorized method is available, but consider
93
93
optimizing performance with vectorized operations wherever possible.
94
94
95
- Examples of usage can be found :ref: ` here < api.dataframe. apply> `.
95
+ Examples of usage can be found :meth: ` ~DataFrame. apply `.
96
96
97
97
:meth: `DataFrame.agg `
98
98
~~~~~~~~~~~~~~~~~~~~~
@@ -103,7 +103,7 @@ specifically designed for aggregation operations.
103
103
When to use: Use :meth: `DataFrame.agg ` for performing aggregations like sum, mean, or custom aggregation
104
104
functions across groups.
105
105
106
- Examples of usage can be found :ref: ` here < api.dataframe. agg> `.
106
+ Examples of usage can be found :meth: ` ~DataFrame. agg `.
107
107
108
108
:meth: `DataFrame.transform `
109
109
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -113,7 +113,7 @@ It’s generally faster than apply because it can take advantage of pandas' inte
113
113
114
114
When to use: When you need to perform element-wise transformations that retain the original structure of the DataFrame.
115
115
116
- Documentation can be found :ref: ` here < api.dataframe. transform> `.
116
+ Documentation can be found :meth: ` ~DataFrame. transform `.
117
117
118
118
Attempting to use common aggregation functions such as ``mean `` or ``sum `` will result in
119
119
values being broadcasted to the original dimensions:
@@ -168,6 +168,8 @@ When to use: Use :meth:`DataFrame.filter` when you want to use a UDF to create a
168
168
Since filter does not directly accept a UDF, you have to apply the UDF indirectly,
169
169
such as by using list comprehensions.
170
170
171
+ Documentation can be found :meth: `~DataFrame.filter `.
172
+
171
173
:meth: `DataFrame.map `
172
174
~~~~~~~~~~~~~~~~~~~~~
173
175
@@ -176,7 +178,7 @@ for this purpose compared to :meth:`DataFrame.apply` because of its better perfo
176
178
177
179
When to use: Use map for applying element-wise UDFs to DataFrames or Series.
178
180
179
- Documentation can be found :ref: ` here < api.dataframe. map> `.
181
+ Documentation can be found :meth: ` ~DataFrame. map `.
180
182
181
183
:meth: `DataFrame.pipe `
182
184
~~~~~~~~~~~~~~~~~~~~~~
@@ -186,7 +188,7 @@ It is a helpful tool for organizing complex data processing workflows.
186
188
187
189
When to use: Use pipe when you need to create a pipeline of transformations and want to keep the code readable and maintainable.
188
190
189
- Documentation can be found :ref: ` here < api.dataframe. pipe> `.
191
+ Documentation can be found :meth: ` ~DataFrame. pipe `.
190
192
191
193
192
194
Best Practices
0 commit comments