Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2021 03:52
What would you like to do?
Code block Regex
py import csv
import re
address_filter=[] #an empty list to store the second column
with open('122023jan.csv', 'r', encoding="utf8") as rf:
reader = csv.reader(rf, delimiter=',')
for row in reader:
regexp = "(\w+), ([A-Z]{2} [0-9]{5})"
regexp = "(\w+) (\w+), ([A-Z]{2} [0-9]{5})"
address = re.findall(regexp, noise_amp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment