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
{ | |
"01": "Alabama", | |
"02": "Alaska", | |
"04": "Arizona", | |
"05": "Arkansas", | |
"06": "California", | |
"08": "Colorado", | |
"09": "Connecticut", | |
"10": "Delaware", | |
"11": "District of Columbia", |
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
#!/usr/bin/env python | |
""" | |
Like cut, but for CSVs. To be used from a shell command line. | |
Note that fields are zero-based, as opposed to 'cut' where they are 1-based. | |
Should use something better than getopt, but this works... | |
Usage: | |
csvcut foobar.csv |
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
#!/usr/bin/env python | |
""" | |
Like cut, but for CSVs. To be used from a shell command line. | |
Note that fields are zero-based, as opposed to 'cut' where they are 1-based. | |
Should use something better than getopt, but this works... | |
Usage: | |
csvcut foobar.csv |
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
#!/usr/bin/env python | |
""" | |
Like cut, but for CSVs. To be used from a shell command line. | |
Note that fields are zero-based, as opposed to 'cut' where they are 1-based. | |
Leveraged from/motivated by an example from @bycoffe | |
Should use something better than getopt, but this works... |