Replies: 2 comments 2 replies
-
If you are looking to add new columns to existing rows, you can use the For example, if I have an existing dataset with columns >>> import lance
>>> import pyarrow as pa
>>> df = pa.table({'x': [1, 2, 3], 'y': ['a', 'b', 'c']})
>>> dataset = lance.write_dataset(df, "dataset")
>>> dataset.to_table().to_pandas()
x y
0 1 a
1 2 b
2 3 c
>>> new_df = pa.table({'x': [1, 2, 3], 'z': ['d', 'e', 'f']})
>>> dataset.merge(new_df, 'x')
>>> dataset.to_table().to_pandas()
x y z
0 1 a d
1 2 b e
2 3 c f Does that look like it will work in your use case? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I've just found this from the doc so append seems to be handled. Remains, how to update a row.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to add new element in existing lance dataset ? Example, in case we want to annotate existing image dataset.
Beta Was this translation helpful? Give feedback.
All reactions