Today I learned that you can import a CSV file into SQLite and then use it to run SQL queries on the data you have. I often feel that it would be easier to just run a short SQL query than try to craft some monstrosity with pandas. Now I know exactly how. Also, in the original issue someone posted a bash function for convenience:
cq() {
local csv_file="${1:?Usage: cq <csv_file> [<table>]}" table="${2:-T}"
sqlite3 -interactive -cmd '.headers on' -cmd '.prompt "\nsqlite> "' \
-cmd '.mode csv' -cmd ".import '$csv_file' '$table'" -cmd ".mode column"
}```