Skip to content

Instantly share code, notes, and snippets.

View gforsyth's full-sized avatar
🐗
Cinghiale

Gil Forsyth gforsyth

🐗
Cinghiale
View GitHub Profile

repr

repr should be very fast repr should allow for recreation of the object but this may not be practical

make sure there is no usage of REPR as a lookup key anywhere

fix the ordering (r10 -> r09)

[ins] In [1]: import ibis

[ins] In [2]: from ibis import _

[ins] In [3]: con = ibis.duckdb.connect("/home/gil/data/imdb.ddb")

[ins] In [4]: ratings = con.tables.ratings

[ins] In [5]: basics = con.tables.basics
import ibis
# Need to define a schema for each table in the SQL
catalog = {
"employee": {"first_name": "string", "last_name": "string", "id": "int64"},
}
# SQL to translate
sql = "SELECT *, first_name as first FROM employee WHERE id < 5 ORDER BY id DESC"
import sys
from xonsh.imphooks import XonshImportHook
from xonsh.execer import Execer
sys.meta_path.append(XonshImportHook(Execer()))
from tiny_scriptlet import *
def test_xonsh_function():

[2024-05-23 Thu 09:13] deltalake Duckdb vs ibis

Dataset

I have a pile of CSVs from the NYC bike share program

ls -l /home/gil/databog/csv/citibike