COPY FROM a Pandas DataFrame Example Issue #3499
-
Hi, I was trying to run the example copy from Pandas. But the example is missing an ending bracket. So it's: conn.execute("COPY Person FROM (LOAD FROM df WHERE age < 30 RETURN *)") But why can't I pass in the Pandas Dataframe as a parameter? I get different errors like On other platforms like Java what would the equivalent Subquery be? Curious what I can pass in as I'd be importing from different sources into a single db schema. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for pointing it out, we'll get that example fixed right away. To your second point, the scanning from Pandas is designed to be for Python users. Kùzu is able to scan Pandas DataFrames both the numpy and Arrow backends by using a memcpy operation, allowing it access to the raw pointers that hold the data. So there's no need to pass it in as a parameter - you'd just access the underlying object via the Python API. Are you trying to access a specific format from your Java application code? Not sure how you'd intend to use Pandas alongside Java 😅. |
Beta Was this translation helpful? Give feedback.
Thanks for pointing it out, we'll get that example fixed right away. To your second point, the scanning from Pandas is designed to be for Python users. Kùzu is able to scan Pandas DataFrames both the numpy and Arrow backends by using a memcpy operation, allowing it access to the raw pointers that hold the data. So there's no need to pass it in as a parameter - you'd just access the underlying object via the Python API.
Are you trying to access a specific format from your Java application code? Not sure how you'd intend to use Pandas alongside Java 😅.