We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement writing and reading back Dask dataframe index.
Right now, after reading back, index will become just another column:
from dask.datasets import timeseries from dask_deltatable import read_delta_table from dask_deltatable.write import to_deltalake if __name__ == "__main__": ddf = timeseries("2023-07-10", "2023-07-12", freq="1H") print(f"\nOriginal:\n{ddf.head()}") ddf.index = ddf.index.astype("datetime64[us]") to_deltalake("t2_data", ddf).compute() ddf2 = read_delta_table("t2_data") print(f"\nRead back:\n{ddf2.head()}")
Output:
Original: name id x y timestamp 2023-07-10 00:00:00 Patricia 989 0.748295 0.513837 2023-07-10 01:00:00 Jerry 993 0.487847 -0.493534 2023-07-10 02:00:00 Victor 1035 0.851038 -0.941464 2023-07-10 03:00:00 Sarah 966 0.878928 -0.087768 2023-07-10 04:00:00 Quinn 983 0.712967 -0.977796 Read back: name id x y timestamp 0 Patricia 989 0.748295 0.513837 2023-07-10 00:00:00 1 Jerry 993 0.487847 -0.493534 2023-07-10 01:00:00 2 Victor 1035 0.851038 -0.941464 2023-07-10 02:00:00 3 Sarah 966 0.878928 -0.087768 2023-07-10 03:00:00 4 Quinn 983 0.712967 -0.977796 2023-07-10 04:00:00
Original PR: #29.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Implement writing and reading back Dask dataframe index.
Right now, after reading back, index will become just another column:
Output:
Original PR: #29.
The text was updated successfully, but these errors were encountered: