Re: Separate Rows in reader

2013-03-28 Thread Tim Roberts
Jiewei Huang wrote: > >Hi the output is: > >[('John Cleese,Ministry of Silly Walks,421,27-Oct',), ('Stacy >Kisha,Ministry of Man Power,1234567,17-Jan',)] > >how to make it to > >[CODE][('John Cleese', 'Ministry of Silly Walks' , '421', '27-Oct'), >('Stacy Kisha', 'Ministry of Man Power',

Re: Separate Rows in reader

2013-03-27 Thread Steven D'Aprano
On Wed, 27 Mar 2013 18:24:24 -0700, rusi wrote: > On Mar 28, 3:26 am, Jiewei Huang wrote: >> On Wednesday, March 27, 2013 9:18:28 PM UTC+10, rusi wrote: >> > On Mar 27, 2:35 pm, Jiewei Huang wrote: >> > > On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: >> > > > On 26/03/2013 03:33, Jie

Re: Separate Rows in reader

2013-03-27 Thread rusi
On Mar 28, 3:26 am, Jiewei Huang wrote: > On Wednesday, March 27, 2013 9:18:28 PM UTC+10, rusi wrote: > > On Mar 27, 2:35 pm, Jiewei Huang wrote: > > > > On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: > > > > > On 26/03/2013 03:33, Jiewei Huang wrote: > > > > > > On Tuesday, March 26,

Re: Separate Rows in reader

2013-03-27 Thread Jiewei Huang
On Wednesday, March 27, 2013 9:18:28 PM UTC+10, rusi wrote: > On Mar 27, 2:35 pm, Jiewei Huang wrote: > > > On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: > > > > On 26/03/2013 03:33, Jiewei Huang wrote: > > > > > > > > On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote

Re: Separate Rows in reader

2013-03-27 Thread Jiewei Huang
On Wednesday, March 27, 2013 9:18:28 PM UTC+10, rusi wrote: > On Mar 27, 2:35 pm, Jiewei Huang wrote: > > > On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: > > > > On 26/03/2013 03:33, Jiewei Huang wrote: > > > > > > > > On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote

Re: Separate Rows in reader

2013-03-27 Thread rusi
On Mar 27, 2:35 pm, Jiewei Huang wrote: > On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: > > On 26/03/2013 03:33, Jiewei Huang wrote: > > > > On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote: > > > >> On 03/25/2013 09:05 PM, Jiewei Huang wrote: > > > >>> On Monday, March

Re: Separate Rows in reader

2013-03-27 Thread Jiewei Huang
On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: > On 26/03/2013 03:33, Jiewei Huang wrote: > > > On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote: > > >> On 03/25/2013 09:05 PM, Jiewei Huang wrote: > > >>> On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote: > > >>

Re: Separate Rows in reader

2013-03-26 Thread Jiewei Huang
On Tuesday, March 26, 2013 1:48:10 PM UTC+10, MRAB wrote: > On 26/03/2013 03:33, Jiewei Huang wrote: > > > On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote: > > >> On 03/25/2013 09:05 PM, Jiewei Huang wrote: > > >>> On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote: > > >>

Re: Separate Rows in reader

2013-03-25 Thread MRAB
On 26/03/2013 03:33, Jiewei Huang wrote: On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote: On 03/25/2013 09:05 PM, Jiewei Huang wrote: On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote: If you insist on using GoogleGroups, then make sure you keep your quotes small. I'm

Re: Separate Rows in reader

2013-03-25 Thread Jiewei Huang
On Tuesday, March 26, 2013 11:40:51 AM UTC+10, Dave Angel wrote: > On 03/25/2013 09:05 PM, Jiewei Huang wrote: > > > On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote: > > > > If you insist on using GoogleGroups, then make sure you keep your quotes > > small. I'm about to stop readin

Re: Separate Rows in reader

2013-03-25 Thread Dave Angel
On 03/25/2013 09:05 PM, Jiewei Huang wrote: > On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote: If you insist on using GoogleGroups, then make sure you keep your quotes small. I'm about to stop reading messages that are double-spaced by buggy software. Have you tried the spl

Re: Separate Rows in reader

2013-03-25 Thread Jiewei Huang
On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote: > On Mar 25, 11:52 am, Jiewei Huang wrote: > > > On Sunday, March 24, 2013 9:10:45 PM UTC+10, ypsun wrote: > > > > Jiewei Huang於 2013年3月24日星期日UTC+1上午6時20分29秒寫道: > > > > > > > > Hi all, > > > > > > > > Currently create a simple text-ba

Re: Separate Rows in reader

2013-03-25 Thread rusi
On Mar 25, 11:52 am, Jiewei Huang wrote: > On Sunday, March 24, 2013 9:10:45 PM UTC+10, ypsun wrote: > > Jiewei Huang於 2013年3月24日星期日UTC+1上午6時20分29秒寫道: > > > > Hi all, > > > > Currently create a simple text-based database of information about people > > > > I have a csv file which consist of 3 rows

Re: Separate Rows in reader

2013-03-24 Thread Jiewei Huang
On Sunday, March 24, 2013 9:10:45 PM UTC+10, ypsun wrote: > Jiewei Huang於 2013年3月24日星期日UTC+1上午6時20分29秒寫道: > > > Hi all, > > > > > > > > > > > > Currently create a simple text-based database of information about people > > > > > > > > > > > > > > > > > > I have a csv file which c

Re: Separate Rows in reader

2013-03-24 Thread rusi
On Mar 24, 11:28 pm, Tim Chase wrote: > > Sorry if my print-statements were misinterpreted--I meant them as a > "do what you want with the data here" stand-in (thus the ellipsis). Heh! I assumed the OP was a noob to whom this was directed (and whose original had the print statements in loops). >

Re: Separate Rows in reader

2013-03-24 Thread Jiewei Huang
On Sunday, March 24, 2013 3:20:29 PM UTC+10, Jiewei Huang wrote: thanks to you guys i got my desire outcome! i will continue to code on writing and saving of csv file -- http://mail.python.org/mailman/listinfo/python-list

Re: Separate Rows in reader

2013-03-24 Thread Tim Chase
On 2013-03-24 08:57, rusi wrote: > On Mar 24, 6:49 pm, Tim Chase wrote: > After doing: > > >>> import csv > >>> original = file('friends.csv', 'rU') > >>> reader = csv.reader(original, delimiter='\t') > > > Stripping of the first line is: > >>> list(reader)[1:] > >>> [tuple(row) for row in list

Re: Separate Rows in reader

2013-03-24 Thread rusi
On Mar 24, 6:49 pm, Tim Chase wrote: > On 2013-03-24 09:03, Dave Angel wrote: > > > >> > > [THANK YOU!] > > > > Sorry my typo in the output here is the correct output that i > > > need : > > > > [('John Konon', 'Ministry of moon Walks', '4567882', '27-Feb'), > > > ( 'Stacy Kisha', 'Ministry of Ma

Re: Separate Rows in reader

2013-03-24 Thread Tim Chase
On 2013-03-24 09:03, Dave Angel wrote: > >> [THANK YOU!] > > Sorry my typo in the output here is the correct output that i > > need : > > > > [('John Konon', 'Ministry of moon Walks', '4567882', '27-Feb'), > > ( 'Stacy Kisha', 'Ministry of Man Power', '1234567', 17-Jan')] > > > > the difference

Re: Separate Rows in reader

2013-03-24 Thread Dave Angel
On 03/24/2013 04:11 AM, Jiewei Huang wrote: Sorry my typo in the output here is the correct output that i need : [('John Konon', 'Ministry of moon Walks', '4567882', '27-Feb'), ( 'Stacy Kisha', 'Ministry of Man Power', '1234567', 17-Jan')] the difference is that i need a [(row two), (row

Re: Separate Rows in reader

2013-03-24 Thread ypsun
Jiewei Huang於 2013年3月24日星期日UTC+1上午6時20分29秒寫道: > Hi all, > > > > Currently create a simple text-based database of information about people > > > > > > I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: > > Name AddressTelephone Birthday > > John Konon

Re: Separate Rows in reader

2013-03-24 Thread ypsun
Jiewei Huang於 2013年3月24日星期日UTC+1上午6時20分29秒寫道: > Hi all, > > > > Currently create a simple text-based database of information about people > > > > > > I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: > > Name AddressTelephone Birthday > > John Konon

Re: Separate Rows in reader

2013-03-24 Thread Jiewei Huang
On Sunday, March 24, 2013 5:34:03 PM UTC+10, rusi wrote: > On Mar 24, 10:46 am, Dave Angel wrote: > > > On 03/24/2013 01:20 AM, Jiewei Huang wrote: > > > > > > > > > > > >this is the data in csv file http://imgur.com/L4qUkGQ and this is the correct output that i need to get: [('John Konon', '

Re: Separate Rows in reader

2013-03-24 Thread Jiewei Huang
On Sunday, March 24, 2013 3:46:49 PM UTC+10, Dave Angel wrote: > On 03/24/2013 01:20 AM, Jiewei Huang wrote: > > > Hi all, > > > > > > Currently create a simple text-based database of information about people > > > > > > > > > I have a csv file which consist of 3 rows , row 1 2 and 3 is as su

Re: Separate Rows in reader

2013-03-24 Thread rusi
On Mar 24, 10:46 am, Dave Angel wrote: > On 03/24/2013 01:20 AM, Jiewei Huang wrote: > > > > > > > > > > > Hi all, > > > Currently create a simple text-based database of information about people > > > I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: > > Name        Address    

Re: Separate Rows in reader

2013-03-23 Thread Dave Angel
On 03/24/2013 01:20 AM, Jiewei Huang wrote: Hi all, Currently create a simple text-based database of information about people I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: Name AddressTelephone Birthday John Konon Ministry of Moon Walks 4567882 2

Separate Rows in reader

2013-03-23 Thread Jiewei Huang
Hi all, Currently create a simple text-based database of information about people I have a csv file which consist of 3 rows , row 1 2 and 3 is as such: Name AddressTelephone Birthday John Konon Ministry of Moon Walks 4567882 27-Feb Stacy Kisha Ministry of Man Power