Skip to content

Bug: unintuitive behavior from csv method return a da but does not modify in place #626

Description

@samsja

Context

Calling the the from_csv method of a DocumentArray will return a new DocumentArray with the csv content loaded but will not modify the orignal DocumenArray inplace

from docarray import DocumentArray

da = DocumentArray()
da.from_csv(os.path.join(cur_dir, 'toydata/docs.csv'))
assert len(da) > 0 # This will faill da is still empty

This work though

from docarray import DocumentArray

da = DocumentArray()
da = da.from_csv(os.path.join(cur_dir, 'toydata/docs.csv'))
assert len(da) > 0 # This will faill da is still empty

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions