pixeltable
pixeltable copied to clipboard
add InsertableTable.insert_file()
Right now, the only way to insert data is via insert(), which expects an in-memory structure.
insert_file(path: str) -> UpdateStatus would accept a path to a file and insert the data, depending on the file format:
- json: contains a list of json objects and can be converted to a list of dicts with json.load(); each object must contain the table's column names as fields
- csv: needs to have a header row, and the column names must correspond to the table's columns