[Tutor] get columns from txt file
Marc Tompkins
marc.tompkins at gmail.com
Fri Jul 13 11:21:40 CEST 2012
Reply to the group, please!
On Fri, Jul 13, 2012 at 2:09 AM, susana moreno colomer <
susana_87 at hotmail.com> wrote:
>
> Hi!
> I am sorry, but still I don't get it!
> I am trying with this (the code is attached)
>
> csv_out=csv.writer(open('out1.csv', 'wb'), delimiter=' ',
> quoting=csv.QUOTE_ALL, dialect='excel')
> and
> csv_out=csv.writer(open('out1.csv', 'wb'), dialect='excel-tab')
>
> When I open out1 with text editor, I get 6 columns, but when I open it
> with excel I get one column (6 numbers on each cell, how can I separate
> it it???)
>
> The files from wich I get the columns are txt files.
>
> Many thanks!!
>
It sounds more like an Excel import problem than a Python output problem at
this point, but it's hard to tell.
Is the data you're dealing with private/confidential? If not, could you
attach your output CSV file? A quick look could take the place of hours of
guesswork.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120713/8e77d96b/attachment.html>
More information about the Tutor
mailing list