-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Restructure and expand UDF page #61470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -118,101 +104,229 @@ decisions, ensuring more efficient and maintainable code. | |||
and :ref:`ewm()<window>` for details. | |||
|
|||
|
|||
:meth:`DataFrame.apply` | |||
~~~~~~~~~~~~~~~~~~~~~~~ | |||
.. _udf.map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we plan to use udf
as the reference, then we should rename the reference on the top of the file from:
.. _user_defined_functions:
to:
.. _udf:
df_filtered = df.filter(items=[col for col in df.columns if is_long_name(col)]) | ||
print(df_filtered) | ||
temperature.apply(highest_jump) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temperature.apply(highest_jump) | |
temperature.agg(highest_jump) |
Looks good to me! I think the example under vectorized operations should be changed to fit with the Fahrenheit example, but that can be added in a follow-up PR. |
Thanks @arthurlw, great feedback. I'll leave the example on the vectorized section for now, as it may make sense to also expand that section as we make progress with the IT engines. Feel free to update it now if you want, but I'm unsure at this point how to add the JIT engines to that section, and how to better present all the performance related topics. Maybe we can just add a section for it, but maybe we can find a way to present it so one topic expands on the previous, as I tried to do with the different methods. |
I changed the order in which the methods are presented,both in the table and in the sections, to be:
I find it easier to explain them in this order.
And I expanded the method sections with examples and a bit more of information.
I removed the most complex example in the intro, as I think the examples in the sections will make a better job now at explaining the most complex cases.
@arthurlw @rhshadrach do you mind having a look?