Created
June 25, 2015 02:46
-
-
Save siroken3/86f94394ab2b72669ac4 to your computer and use it in GitHub Desktop.
tsvにschemaを付与するテスト
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
>>> org = '11:00:00 512 256' | |
>>> dict(zip([sce["name"] for sce in sc], org.split())) | |
{'time': '11:00:00', 'hoge': '512'} | |
>>> sc = [{"name":"time", "type":"INTEGER"},{"name":"hoge", "type":"INTEGER"},{"name":"fuga", "type":"STRING"}] | |
>>> dict(zip([sce["name"] for sce in sc], org.split())) | |
{'time': '11:00:00', 'fuga': '256', 'hoge': '512'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment