A blog to help me remember what in the hell i've done and what not to do again. ever. Maybe you'll learn from my mistakes or epiphanies.
Blog topics include SQL, T-SQL, Google, Windows, Visual Basic, Python, C#, etc.
Thursday, August 7, 2014
Python csv.reader to list
Quickly 'convert' a Python csv.reader object into a list (for instance to bulk insert using ceODBC).
*You may or may not need the .splitlines() call depending on the csv.
list = [row for row in csv.reader(csv_file.splitlines())][1:]
No comments:
Post a Comment