Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 166
minor: remove deprecated interfaces#1481
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
98da313bdf8c899d28c0b1b77551e70cd28e6e6459599ef60d5283ef2ab0698885502bd8d644107502c1a185cfb8f7bd79File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -175,10 +175,7 @@ it's ``Type 2`` column that are null. | ||
| Aggregate Functions | ||
| ------------------- | ||
| You can use any :ref:`Aggregation Function<aggregation>` as a window function. Currently | ||
| aggregate functions must use the deprecated | ||
| :py:func:`datafusion.functions.window` API but this should be resolved in | ||
| DataFusion 42.0 (`Issue Link <https://github.com/apache/datafusion-python/issues/833>`_). Here | ||
| You can use any :ref:`Aggregation Function<aggregation>` as a window function. Here | ||
| is an example that shows how to compare each pokemons’s attack power with the average attack | ||
| power in its ``"Type 1"`` using the :py:func:`datafusion.functions.avg` function. | ||
| @@ -189,10 +186,12 @@ power in its ``"Type 1"`` using the :py:func:`datafusion.functions.avg` function | ||
| col('"Name"'), | ||
| col('"Attack"'), | ||
| col('"Type 1"'), | ||
| f.window("avg", [col('"Attack"')]) | ||
| .partition_by(col('"Type 1"')) | ||
| .build() | ||
| .alias("Average Attack"), | ||
| f.avg(col('"Attack"')).over( | ||
| Window( | ||
| window_frame=WindowFrame("rows", None, None), | ||
| partition_by=[col('"Type 1"')], | ||
| ) | ||
| ).alias("Average Attack"), | ||
Comment on lines
+189
to
+194
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The window_frame is necessary so that we get the same avg across the entire partition. Otherwise we'd need a sort on it afterwards to make sure it shows up in the "running avg" and I think using the frame is more easy to understand. But you're right about the null treatment and order_by. | ||
| ) | ||
| Available Functions | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Strange that this is deprecated in
datafusion-pythonbut not indatafusion: https://docs.rs/datafusion/53.0.0/datafusion/dataframe/struct.DataFrame.html#method.select_columnsThere 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.
Because we can take both arguments in select vs select_columns, we deprecated select_columns a long time ago because it's more pythonic to have just one interface.