You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/18 14:01:44 UTC

[GitHub] [arrow-datafusion-python] francis-du commented on a diff in pull request #35: [DataFrame] - Add union and union_distinct bindings for DataFrame

francis-du commented on code in PR #35:
URL: https://github.com/apache/arrow-datafusion-python/pull/35#discussion_r949172629


##########
src/dataframe.rs:
##########
@@ -164,4 +164,24 @@ impl PyDataFrame {
         let batches = wait_for_future(py, df.collect())?;
         Ok(pretty::print_batches(&batches)?)
     }
+
+    /// Calculate the union of two `DataFrame`s, preserving duplicate rows.The
+    /// two `DataFrame`s must have exactly the same schema
+    #[args(distinct = false)]
+    fn union(&self, py_df: PyDataFrame, distinct: bool) -> PyResult<Self> {

Review Comment:
   When `df.union(df,distinct=true)`, it has the same function as `df.union_distinct(df)`



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org