Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
2 answers
1k views

Mapping column names and values of a csv using another csv

I have two csv files, pricat.csv which contains objects I need to populate my DB with, and mapping.csv which specifies how the ...
Adamantoisetortoise's user avatar
3 votes
1 answer
2k views

Exporting data from PostgreSQL as CSV to S3 bucket

I have a general question regarding DRY. As you can see there are several parts such as io.StringIO(), csv.writer, ...
Joey Coder's user avatar
1 vote
1 answer
66 views

script that imports only data that is not in the database yet

I want to write a script that imports data into a database (in django). The database has a Company class with a name (CharField) instance. Additionally, it has a Person class with name (CharField), ...
Tom's user avatar
  • 241
6 votes
1 answer
645 views

Creating a pythonic snippet to read and clean .csv files

I am trying to import a .csv file, clean the contents, and make sure all the errors are eliminated. IO error file format error data error I am using the snippet below. Could someone help me clean ...
Ram Kumar's user avatar
  • 161
10 votes
2 answers
8k views

Faster Django CSV generation for several million database entries

I am writing a CSV file generator that's filtering through about seven million database entries (MySQL backend). This part is especially slow and I was wondering if there is a way to make it much ...
tr33hous's user avatar
  • 205