tobiah wrote:
> John Machin wrote:
> > tobiah wrote:
> >
> >> Of course, fixing the csv file takes a little more work. It sounds like
> >> the
> >> test lines given were just one of the fields, and there are
> >> the quotes to worry about.
> >>
> > [snip]
> >> But then this fails if there are co
John Machin wrote:
> tobiah wrote:
>
>> Of course, fixing the csv file takes a little more work. It sounds like the
>> test lines given were just one of the fields, and there are
>> the quotes to worry about.
>>
> [snip]
>> But then this fails if there are commas in the
>> data. I could split an
At Tuesday 29/8/2006 20:31, tobiah wrote:
>> I have a csv file which is has a field that has something like:
>>
But then this fails if there are commas in the
data. I could split and join on '","' but then
that fails when 'x' is either the first or last field.
Are there tools in the csv module
Norman Khine:
> I have a csv file which is has a field that has something like:
> "text (xxx)"
> "text (text) (yyy)"
> "text (text) (text) (zzz)"
>
> I would like to split the last '(text)' out and put it in a new column,
> so that I get:
> "text","(xxx)"
> "text (text)","(yyy)"
> "text (text) (tex
tobiah wrote:
> Of course, fixing the csv file takes a little more work. It sounds like the
> test lines given were just one of the fields, and there are
> the quotes to worry about.
>
[snip]
>
> But then this fails if there are commas in the
> data. I could split and join on '","' but then
> t
Tim Chase wrote:
> Norman Khine wrote:
>> Hello,
>> I have a csv file which is has a field that has something like:
>>
>> text.csv
>> "text (xxx)"
>> "text (text) (yyy)"
>> "text (text) (text) (zzz)"
>>
>> I would like to split the last '(text)' out and put it in a new
>> column, so that I get:
>
Tim Chase wrote:
> Norman Khine wrote:
> > Hello,
> > I have a csv file which is has a field that has something like:
> >
> > text.csv
> > "text (xxx)"
> > "text (text) (yyy)"
> > "text (text) (text) (zzz)"
> >
> > I would like to split the last '(text)' out and put it in a new column,
> > so that
Norman Khine wrote:
> Hello,
> I have a csv file which is has a field that has something like:
>
> text.csv
> "text (xxx)"
> "text (text) (yyy)"
> "text (text) (text) (zzz)"
>
> I would like to split the last '(text)' out and put it in a new column,
> so that I get:
>
> new_test.csv
> "text","