You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importmylib# dumb module name importpolarsaspldf=pl.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
mycontainer=mylib.Container(df)
print(mycontainer.df) # print dfa=mycontainer.dfa[0, 'A'] =5print(a) # the first row of col 'A' of a is now 5print(mycontainer.df) # is sill df
I thought that everything would be zero-copy or just passing of references so that any manipulation on the rust or python side would be on the same reference object.
I might be a bit naive (there is something about using some Py<..> for classes in pyo3 but I don't understand how it fits within pyo3-polars.
Many thanks and sorry for a beginner kind of question.
The text was updated successfully, but these errors were encountered:
Thanks for the great work with polars as well as the pyo3 exposition of dataframe/series.
I have the following problem (disclaimer still a couple of hours away form
hello rust
).I want a rust
struct
containing several dataframes accessible in python with polars (and eventually zero copy to pandas with arrow).I don't quite understand how to pass a shared reference in that case.
Here is a minimal example.
Cargo.toml
src/lib.rs
compilation is ok, now in python
I thought that everything would be zero-copy or just passing of references so that any manipulation on the rust or python side would be on the same reference object.
I might be a bit naive (there is something about using some
Py<..>
for classes in pyo3 but I don't understand how it fits within pyo3-polars.Many thanks and sorry for a beginner kind of question.
The text was updated successfully, but these errors were encountered: