Re: How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex?

2017-03-22 Thread Irving Duran
<pre>You can do the following df['field'] = df.replace(r'(?<![\d])(\d{2})', '', regex=True) Thank You, Irving Duran On Mon, Mar 20, 2017 at 9:53 AM, David Shi via Python-list < python-list@python.org> wrote: > Hi, there, > Can anyone help? > How to search out a

How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex?

2017-03-20 Thread David Shi via Python-list
Hi, there, Can anyone help? How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex? For instance, a ZIP code 33132 was found and replaced with 33. Looking forward to hearing from you. Regards. David -- https://mail.python.org/mailman

Re: zip codes

2009-08-18 Thread Grant Edwards
On 2009-08-17, Sjoerd Mullender sjo...@acm.org wrote: Also in The Netherlands, ZIP codes are much more fine-grained than in some other countries: ZIP code plus house number together are sufficient to uniquely identify an address. I.e. you don't need the street name. E.g., my work address has

Re: zip codes

2009-08-17 Thread Aahz
In article 35833d36-2fdc-4ed8-8142-604af3c88...@k6g2000yqn.googlegroups.com, Shailen shailen.t...@gmail.com wrote: Is there any Python module that helps with US and foreign zip-code lookups? I'm thinking of something that provides basic mappings of zip to cities, city to zips, etc. Since this

zip codes

2009-08-17 Thread Shailen
Is there any Python module that helps with US and foreign zip-code lookups? I'm thinking of something that provides basic mappings of zip to cities, city to zips, etc. Since this kind of information is so often used for basic user-registration, I'm assuming functionality of this sort must be

Re: zip codes

2009-08-17 Thread Martin P. Hellwig
of this sort must be available for Python. Any suggestions will be much appreciated. There might be an associated can of worms here, for example in the Netherlands zip codes are actually copyrighted and require a license if you want to do something with them, on the other hand you get a nice SQL

Re: zip codes

2009-08-17 Thread Sjoerd Mullender
assuming functionality of this sort must be available for Python. Any suggestions will be much appreciated. There might be an associated can of worms here, for example in the Netherlands zip codes are actually copyrighted and require a license if you want to do something with them, on the other

Re: zip codes

2009-08-17 Thread MRAB
-registration, I'm assuming functionality of this sort must be available for Python. Any suggestions will be much appreciated. There might be an associated can of worms here, for example in the Netherlands zip codes are actually copyrighted and require a license if you want to do something

Re: zip codes

2009-08-17 Thread steven.oldner
, etc. Since this kind of information is so often used for basic user-registration, I'm assuming functionality of this sort must be available for Python. Any suggestions will be much appreciated. There might be an associated can of worms here, for example in the Netherlands zip codes

Re: zip codes

2009-08-17 Thread Nigel Rantor
for basic user-registration, I'm assuming functionality of this sort must be available for Python. Any suggestions will be much appreciated. There might be an associated can of worms here, for example in the Netherlands zip codes are actually copyrighted and require a license if you want to do

Re: zip codes

2009-08-16 Thread Shailen
Thanks Martin and Aahz. Anyone know if zip code information is copyrighted for the US? Anyone can look up zip codes on usps.gov (and other locations),so the information is readily available. I need zip codes for a handful of cities and could map those myself (or write a script to scrape them

Re: zip codes

2009-08-16 Thread Paul Rubin
Shailen shailen.t...@gmail.com writes: Thanks Martin and Aahz. Anyone know if zip code information is copyrighted for the US? Anyone can look up zip codes on usps.gov (and other locations),so the information is readily available. I need zip codes for a handful of cities and could map those

Re: zip codes

2009-08-16 Thread Paul Rubin
It was a long time ago, I don't remember specifics, and the contents are surely out of date by now, but I extracted a bunch of the TIGER geographic coordinates for zip codes here: http://www.nightsong.com/phr/chess/zipcodes.zip That file may have actually come from here: http

Re: zip codes

2009-08-16 Thread Grant Edwards
On 2009-08-16, Shailen shailen.t...@gmail.com wrote: Thanks Martin and Aahz. Anyone know if zip code information is copyrighted for the US? You can't copyright information as such. Only concrete expressions of information. A particular publication containing zip code information can be

Re: Trying to find zip codes/rest example

2007-08-04 Thread Van Lindberg
Jay Loden wrote: I don't remember the demo, but a little creative googling turned up http://bitworking.org/news/132/REST-Tips-URI-space-is-infinite Which matches the description above perfectly, so I assume it's what you were after :-) That is exactly what I was trying to find! I bow down

Trying to find zip codes/rest example

2007-08-03 Thread VanL
Hello, A couple months ago there was an example posted in a blog of a rest interface for validating zip codes. If I recall correctly, the backend validator was written in python. The validator demo page had a single text input; next to the text input would appear either a green check

Re: Trying to find zip codes/rest example

2007-08-03 Thread Terry Reedy
VanL [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | | I now cannot find this demo and the associated discussion. Does anybody | remember this demo and where I might be able to find it? No, but does the localflavor entry on

Re: Trying to find zip codes/rest example

2007-08-03 Thread VanL
Terry Reedy wrote: No, but does the localflavor entry on http://code.djangoproject.com/browser/django/trunk/docs/add_ons.txt?rev=5118 help? (found with Google) Thanks, but no. A friend asked for advice about implementing a password-checking interface; I remembered that the method described

Re: Trying to find zip codes/rest example

2007-08-03 Thread Jay Loden
VanL wrote: Hello, A couple months ago there was an example posted in a blog of a rest interface for validating zip codes. If I recall correctly, the backend validator was written in python. The validator demo page had a single text input; next to the text input would appear either