About Archive Tag Cloud Translations RSS

You are writing a comment about Huge CSV and XML Files in Python, here is a quick summary:

Quick walkthrough of my code for converting a very large CSV file into a very large XML file using the Python standard libraries. Despite a few issues along the way, was a very pleasant experience.


You are responding to this comment written by Alex on January 23rd 2009, 04:46.

Well, I'm glad that helped; ironically, I was barking completely up the wrong tree when I wrote that. I was in the process of converting a MySQL dump of all the world's airports into an SQLite database file, and I hit on the idea of trimming off the various sql statements from it and converting it to a tab-delimited text file, then using csvreader to extract the rows and writing them out to the db.

In fact, what happened was that the parsing didn't work and the whole db was stuffed into the first csvreader row, hence the row out of range error.


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")