legout commented on issue #13747:
URL: https://github.com/apache/arrow/issues/13747#issuecomment-1270226592

   Hope this is not off-topic, but you can leverage `duckdb` or `polars` for 
this.
   
   ```python
   import duckdb
   import pyarrow.dataset as ds
   import polars as pl
   
   dset = ds.dataset('path/to/data')
   
   # duckdb
   con = duckdb.connect()
   
   table = con.query("SELECTsum(col1), count(col1) FROM dset WHERE  col1>10 
GROUP BY col2").arrow() 
   
   #polars
   table = pl.scan_ds(dset).filter(pl.col("col1")>10).groupby("col2").agg(
           [pl.col("col1").sum(), pl.col("col1").count()]
       ).collect().to_arrow()
   ```
   


-- 
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]

Reply via email to