nuno-faria commented on code in PR #1481:
URL:
https://github.com/apache/datafusion-python/pull/1481#discussion_r3053901629
##########
docs/source/user-guide/common-operations/windows.rst:
##########
@@ -189,10 +186,14 @@ 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"')],
+ order_by=[col('"Speed"')],
+ null_treatment=NullTreatment.IGNORE_NULLS,
+ )
+ ).alias("Average Attack"),
Review Comment:
I don't think the `order_by`, `window_frame`, or `null_treatment` make sense
here.
##########
crates/core/src/dataframe.rs:
##########
@@ -554,13 +554,6 @@ impl PyDataFrame {
Ok(PyTable::from(table_provider))
}
- #[pyo3(signature = (*args))]
- fn select_columns(&self, args: Vec<PyBackedStr>) ->
PyDataFusionResult<Self> {
- let args = args.iter().map(|s| s.as_ref()).collect::<Vec<&str>>();
- let df = self.df.as_ref().clone().select_columns(&args)?;
- Ok(Self::new(df))
- }
-
Review Comment:
Strange that this is deprecated in `datafusion-python` but not in
`datafusion`:
https://docs.rs/datafusion/53.0.0/datafusion/dataframe/struct.DataFrame.html#method.select_columns
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]