ibis
ibis copied to clipboard
feat(api): support row-based table creation
create_table should support insertion from rows, including list of non-mapping sequences, mappings, and generally anything that behaves like those without modification.
Something similar to this:
def create_table(tablename, rows=None, schema=None, columns=None):
# 1. (tablename, schema='') -> empty table
# 2. (tablename, rows=list of lists, columns=list of str) -> table
# 3. (tablename, rows=list of dicts) -> table with inferred schema (?)
# 4. (tablename, rows=list of lists, schema=...) -> table with column names inferred from schema
You can now use con.create_table('my_table', ibis.memtable(rows)) to do this.