Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

v2: handle load from external data sources #971

Description

@samsja

Would it be possible to import from other datasources like csv or pandas dataframe in docarray v2?

Possible API:

class MyDoc(BaseDocument):
   price: float
   name: str
   date: Date
data.csv

price, name, date
1000, iphone, 2009
500, samsung, 2011
...
da = DocumentArray[MyDoc].from_csv('data.csv')

print(da[0])
>>> MyDoc(price=1000, name= iphone, date = 2011)

Question:

Can we auto detect the schema from the csv ? Is it something that we even want ?

Activity

  1. converted this from a draft issue on Jan 3, 2023
  2. added
    DocArray v2This issue is part of the rewrite; not to be merged into main
    on Jan 4, 2023
  3. moved this from Todo to In Progress in DocArray backlogon Feb 23, 2023
  4. moved this from In Progress to Done in DocArray backlogon Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DocArray v2This issue is part of the rewrite; not to be merged into main

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions