Better HN
topnewbestaskshowjobs
Log inSign up

CyberBull

1 karma · joined Dec 17, 2022 (3y ago) · 1 submissions

Submissions

comment 3y ago · link · parent

Loading the CSV through read_CSV then maybe querying it as json/dict.

So read_csv(file).to_dict(orient='records')

That changes the CSV data into a list of objects. I had this problem in a project I was working on and it speed up the processing.

You could then also revert the data back to CSV through DataFrame(list).to_csv(path to save the file)