51 karma · joined Jan 28, 2015 (11y ago) · 7 submissions
comment 6y ago · link · parent
https://www.metabase.com/docs/latest/users-guide/custom-ques...
comment 7y ago · link · parent
import pandas as pd
pd.read_csv('bad_file.csv', error_bad_lines=False).to_csv('good_file.csv')
It's not efficient (reads everything into memory), but read_csv is robust when it comes to handling embedded unescaped quotes/commas/etc., and supports dropping rows with the incorrect number of columns due to anomalies it can't handle.comment 9y ago · link · parent
For instance, searching for "flask" and limiting the results to >1000 stars returns only the 27 repositories with a matching description[0], but the code search returns over 4 million results, ignoring the stars parameter[1].
https://github.com/search?l=&q=flask+stars%3A%3E1000&ref=adv...
https://github.com/search?l=&q=flask+stars%3A%3E1000&ref=adv...
comment 9y ago · link · parent
comment 9y ago · link · parent