Created
March 3, 2015 16:41
-
-
Save arowla/594d94447b43d0f51310 to your computer and use it in GitHub Desktop.
Building FEC field lists (using Python to write Python)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
common_fields = set(house_senate_fields.keys()) & set(pac_party_fields.keys()) & set(presidential_fields.keys())) | |
print "house_senate_fields" | |
house_senate_uniques = set(house_senate_fields.keys()) - set(common_fields.keys()) | |
print "pac_party_fields" | |
pac_party_uniques = set(pac_party_fields.keys()) - set(common_fields.keys()) | |
print "presidential_fields" | |
presidential_uniques = set(presidential_fields.keys()) - set(common_fields.keys()) | |
for myset in [house_senate_uniques, pac_party_uniques, presidential_uniques]: | |
print "\n" | |
for x in list(myset): | |
print "'{}': fields.Integer,".format(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment