Skip to content

Instantly share code, notes, and snippets.

@rabbleNaut
Last active August 29, 2015 13:57
Show Gist options
  • Save rabbleNaut/9662944 to your computer and use it in GitHub Desktop.
Save rabbleNaut/9662944 to your computer and use it in GitHub Desktop.
Used for preparing 2010 Census Summary tables for Texas.
# For each line in the text file, remove the first 4 columns
f1 = open('tx000382010.txt', 'r')
f2 = open('tx000382010mod.txt', 'w')
for line in f1:
f2.write(line.replace('SF1ST,TX,000,38,', ''))
f1.close()
f2.close()
print '''
All done!
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment