CSV to HTML Table in Python

by Amit


I recently wrote a quick script to convert CSV files of the form:

foo, bar
blah, blah

into nice HTML displays.

Pseudo code:

  1. Open the CSV file for reading
  2. Parse each line of the CSV file
  3. Each line of the CSV file => 1 row in the HTML file table
  4. repeat 2 and 3

The code is here

Hope it is useful! Suggestions to improve it welcome.

PS: Useful tips for handling CSV files in Python is here

Advertisement