.format csv
.import <path to csv file> <table name>
Alternatively, read your data into pandas and there's extremely easy interop between a DBAPI connection from the python standard lib Sqlite3 module and Pandas (to_sql, read_sql_query, etc.).SQLite supports defining columns without a type and will use TEXT by default, so you can take the first line of your CSV that lists the document's dimensions, put those in the brackets of a CREATE TABLE statement, and then run the .import described above (so just CREATE TABLE foo(x,y,z); if x,y,z are your column names).
After importing the data don't forget to create indexes for the queries you'll be using most often, and you're good to go.
Another suggestion for once your data is imported, have SQLite report it in table format:
.mode column
.headers onhttps://wellsr.com/python/create-scalar-and-aggregate-functi...
However, I think the limited type system in SQLite means you would still want to extract more data to process in Python, whether via pandas, numpy, or scipy stats functions. Rather introducing new composite types, I think you might be stuck with just JSON strings and frequent deserialization/reserialization if you wanted to build up structured results and process them via layers of user-defined functions.
q "SELECT COUNT(*) FROM ./clicks_file.csv WHERE c3 > 32.3"
It uses sqlite under the hood.
1: https://csvkit.readthedocs.io/en/latest/scripts/csvsql.html
It does have some nice import features for CSV data though.