I have a dataframe in pandas and I need to transfer it to delta format without using spark.
I searched a lot about this but I didn't find any solution that doesn't use spark.
import pandas as pd
df = pd.DataFrame({"x": [1, 2, 3],"y": [3, 2, 1]})
I have a dataframe in pandas and I need to transfer it to delta format without using spark.
I searched a lot about this but I didn't find any solution that doesn't use spark.
import pandas as pd
df = pd.DataFrame({"x": [1, 2, 3],"y": [3, 2, 1]})
The delta-rs library does not have a spark dependency. You can save your pandas DataFrame as a Delta Table the following way:
import pandas as pd
from deltalake.writer import write_deltalake
df = pd.DataFrame({"x": [1, 2, 3],"y": [3, 2, 1]})
write_deltalake('/path/to/save/delta/table', df)
To install the delta-rs library, you can use pip:
$ pip install deltalake
Or you can use conda:
$ conda install -c conda-forge delta-spark