johnnyg opened a new issue, #1166:
URL: https://github.com/apache/datafusion-python/issues/1166

   **Describe the bug**
   When trying to pass a dataframe to another library that expects an 
[ArrowStream export 
interface](https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html#arrowstream-export)
 we get the following error:
   ```python
   TypeError: argument 'input': DataFrame.__arrow_c_stream__() missing 1 
required positional argument: 'requested_schema'
   ```
   this is because the `requested_schema` argument should be optional but it's 
not.
   
   **To Reproduce**
   ```python
   from arro3.core import RecordBatchReader
   import datafusion
   
   data = [{"num": 42}]
   ctx = datafusion.SessionContext()
   df = ctx.from_pylist(data)
   reader = RecordBatchReader.from_arrow(df)
   ```
   
   **Expected behavior**
   The above to run without error
   
   **Additional context**
   Replacing `RecordBatchReader.from_arrow(df)` with 
`RecordBatchReader.from_arrow(df.df)` works around the bug


-- 
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-unsubscr...@datafusion.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to