Re: Separate Address number and name

2014-01-23 Thread Denis McMahon
On Wed, 22 Jan 2014 17:35:22 +, Denis McMahon wrote: On Tue, 21 Jan 2014 16:06:56 -0800, Shane Konings wrote: The following is a sample of the data. A mechanism using regexes Just to follow up, using regexes I transformed the sample data that I believe is as follows: inputData = [ 1

Re: Separate Address number and name

2014-01-22 Thread Mark Lawrence
On 22/01/2014 00:06, Shane Konings wrote: The following is a sample of the data. There are hundreds of lines that need to have an automated process of splitting the strings into headings to be imported into excel with theses headings See here for code that could simplify your extire task

Re: Separate Address number and name

2014-01-22 Thread Denis McMahon
On Tue, 21 Jan 2014 15:49:16 -0800, Shane Konings wrote: I have the following sample from a data set and I am looking to split the address number and name into separate headings as seen below. FarmIDAddress 1 1067 Niagara Stone 24260 Mountainview 3 25 Hunter 4 1091

Re: Separate Address number and name

2014-01-22 Thread Denis McMahon
On Tue, 21 Jan 2014 16:06:56 -0800, Shane Konings wrote: The following is a sample of the data. There are hundreds of lines that need to have an automated process of splitting the strings into headings to be imported into excel with theses headings ID Address StreetNum StreetName

Re: Separate Address number and name

2014-01-21 Thread Anders Wegge Keller
Shane Konings shane.koni...@gmail.com writes: I have struggled with this for a while and know there must be a simple method to achieve this result. There are several. But without seeing the code you have already written, it's har to help you improve it. -- /Wegge Leder efter redundant

Re: Separate Address number and name

2014-01-21 Thread Shane Konings
I don't have any code to split that part up. There is other information following the street name such as street suffix, city, province, postal code, etc. I have been able to split the rest of it up based on certain criteria but have had no luck with splitting up the street name from the

Re: Separate Address number and name

2014-01-21 Thread Ben Finney
Shane Konings shane.koni...@gmail.com writes: I have the following sample from a data set and I am looking to split the address number and name into separate headings as seen below. FarmIDAddress 1 1067 Niagara Stone 2 4260 Mountainview 3 25 Hunter 4 1091

Re: Separate Address number and name

2014-01-21 Thread Shane Konings
inHandler = open(inFile, 'r') outHandler = open(outFile, 'w') outHandler.write('ID\tAddress\tStreetNumName\tSufType\tDir\tCity\tProvince\tPostalCode\n') for line in inHandler: str = line.replace('FarmID\tAddress','') outHandler.write(str[0:-1]) str = str.replace(', ON', '\t ON\t')

Re: Separate Address number and name

2014-01-21 Thread Asaf Las
On Wednesday, January 22, 2014 1:49:16 AM UTC+2, Shane Konings wrote: I have the following sample from a data set and I am looking to split the address number and name into separate headings as seen below. I have struggled with this for a while and know there must be a simple method to

Re: Separate Address number and name

2014-01-21 Thread Anders Wegge Keller
Shane Konings shane.koni...@gmail.com writes: ... The following is a sample of the data. There are hundreds of lines that need to have an automated process of splitting the strings into headings to be imported into excel with theses headings ID Address StreetNum StreetName SufType Dir

Re: Separate Address number and name

2014-01-21 Thread John Gordon
In 9fe1b47b-65ce-4063-9188-07b81cdba...@googlegroups.com Shane Konings shane.koni...@gmail.com writes: I have the following sample from a data set and I am looking to split the address number and name into separate headings as seen below. FarmIDAddress 1 1067 Niagara Stone 2

Re: Separate Address number and name

2014-01-21 Thread Tim Chase
On 2014-01-22 02:46, John Gordon wrote: FarmID AddressNumAddressName 1 1067 Niagara Stone 2 4260 Mountainview 3 25Hunter 4 1091 Hutchinson I have struggled with this for a while and know there must be a simple method to