GitHub user Xuanwo added a comment to the discussion: how to download files 
into local from remote

Hi, please try read like a file:

```py
import opendal
import polars as pl

# Init an operator.
op = opendal.Operator("fs", root="/tmp")

# Create a DataFrame.
df = pl.DataFrame({"name": ["Alice", "Bob"], "age": [20, 30]})
print(f"df: {df}")

# Open and write the DataFrame to the file.
with op.open("test.csv", mode="wb") as file:
    df.write_csv(file)

# Open and read the DataFrame from the file.
with op.open("test.csv", mode="rb") as file:
    read_df = pl.read_csv(file)
    print(f"read_df: {read_df}")
```


GitHub link: 
https://github.com/apache/opendal/discussions/5200#discussioncomment-10980384

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to