python


Split csv file into SINGLE COLUMN text files


I have a .csv file with stock data with 7 columns, that is 7 comma- separated values per row. There are thousands of rows, and I want to read this file and write the columns in their entirety to individual text files.
This should not be to difficult but I can find no one doing this kind of operation ?
To make it perfectly clear. I have 1 .csv file with 7 comma- separated values. I want to write these to 7 text files based on column.
Anybody who have done this and can assist ? Much obliged.
Pseudocode:
with open CSV, open file column 1, open file column 2, ..., open file column 7:
fh = [fh1, fh2, ... fh7]
while CSV readline
for I, column_data in CSV line:
fh[I].write(column_data)

Related Links

Python mysqldb fetchmany not working properly
importerror: no module named html.parser
Algorithm to resove the offset between unpaired 2d coordinates (better in Python)?
Error Installing Scrapy on Mac OSX 10.9.2
Saving an Element in an Array Permanently
Python - Flask: render_template() not found [duplicate]
How to read/access a filename with non-ascii characters
Why getting lists without brackets?
How do people usually operate information on server database?
Python: Return function won’t return a list
Which python Linux IDEs support GAE's webapp2 framework?
Using an argument from one Function in a separate function
Can Nikola bootstrap Jinja2 theme render navigation dropdown menu in nikola?
Running Django unittests causes South migrations to duplicate tables
Python - Regex capture multiple fields and build a dictionary with them
Running multiple Python scripts

Categories

HOME
laravel-5
semantic-ui
jenkins-plugins
reverse-engineering
oauth
wmic
mapping
paramiko
azureservicebus
jboss-eap-7
dlib
rebol2
aspell
zope
factor-analysis
pyephem
tweets
marathon
dspic
fabric
printdocument
switching
web-frontend
fetch-api
mayavi
reply
lmdb
smart-mobile-studio
expand
idl
swiftcharts
web-audio-api
openpgp
nunit-3.0
initializer
installshield-2012
active-model-serializers
soundjs
ddms
web-development-server
jupyter-console
taglib
w3-total-cache
ideone
workflow-foundation-4.5
cgcontext
crash-reports
forerunnerdb
jszip
jcreator
emgu
pydio
try-finally
webkit2
bacnet
dojox.charting
dac
eml
xjc
apache-mina
scrollspy
custom-url
obfuscar
pgagent
proximity
genetic-programming
dto
system.web
neoload
colt
funkload
phpdocx
lumx
magic-numbers
bounds
uipickerviewcontroller
db4o
mimosa
hamsterdb
cilk-plus
nservicebus4
loop-invariant
dig
justgage
dropdownlistfor
tfs-power-tools
selectonemenu
querystringparameter
coff
smooth
j-interop
hardware-acceleration
external-assemblies
code-design
oggvorbis
data-entry
divx

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App