ibis icon indicating copy to clipboard operation
ibis copied to clipboard

feat(api): support row-based table creation

Open cpcloud opened this issue 3 years ago • 0 comments

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

cpcloud avatar Jul 06 '22 21:07 cpcloud

You can now use con.create_table('my_table', ibis.memtable(rows)) to do this.

cpcloud avatar Sep 21 '22 12:09 cpcloud