Quantcast

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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

David Shi
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

_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev
Loading...