标准化美国各州的日期
latimes-statestyle的Python项目详细描述
8''8''8
8 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8 eeeeeeeeeeeeeeeee8 eeeeeeeeeeeee8 eeeeeeeee8 eeeeeeeee8 eeeeeee8 eeeee8 eeeeeee8 eeeeeeee8 eeee 8 ee8 eeeeee8 ee8 ee8 eeee8 ee8 ee8 ee8 ee8 ee8 ee888ee 8eee88 88 88eee 88ee<;/代码>;
一个规范美国各州名称的python库
[![构建状态](https://travis-ci.org/datadesk/latimes-statestyle.png?branch=master)(https://travis ci.org/datadesk/latimes statestyle)
[![PYPI版本](https://badge.fury.io/py/latimes statestyle.png)(http://badge.fury.io/py/latimes statestyle)
[![覆盖状态](https://coveralls.io/repos/datadesk/latimes-statestyle/badge.png?branch=master)(https://coveralls.io/r/datadesk/latimes-statestyle?branch=master)
*问题:[https://github.com/datadesk/latimes statestyle/issues](https://github.com/datadesk/latimes statestyle/issues)
*包装:[https://pypi.python.org/pypi/latimes statestyle](https://pypi.python.org/pypi/latimes statestyle)
*测试:[https://travis ci.org/datadesk/latimes statestyle](https://travis ci.org/datadesk/latimes statestyle)
*覆盖范围:[https://coveralls.io/r/datadesk/latimes statestyle](https://coveralls.io/r/datadesk/latimes statestyle)
邮政编码或美联社缩写或[FIPS
代码](https://en.wikipedia.org/wiki/federal_information_processing_standards)
并接收一个以所有其他格式作为属性的干净对象。
-state object s还为[propublica
state的web字体提供“stateface”代码形状](http://propublica.github.com/stateface/)
Getting Started
----
>Getting Started与…
``bash
$pip install latimes statestyle
````
>然后开始为其提供数据。
``python
>;Import statestyle
obj=state style.get('ca')
```
>如果有匹配项,则可以访问干净、标准化的属性。
````python
`;这里是州的全名;打印obj.name
California
>加州的美国邮政编码
>;打印obj.pos邮
ca
ca
;美联社的文体缩写
>;是的>;打印目标AP
Calif.
obj.stateface
“e”
```
打印obj.name
California
```
在“获取”(“您请求的状态不存在”)中,您所请求的状态不存在。这是您可以将其返回的对象转换为字典的一种方法,'ap':'calif.','fips':'6','postal':'ca','type':'state','stateface':'e'}
>;>;o.to_dict()
{name':'california','ap':'calif.','fips':'6','postal':'ca','type':'state','stateface':'e'}
o['name']
'california'
```
更改或修改现有数据,编辑< BR/> 'StStistle /DATa. CSV ',然后运行'Python Budio.py',它将重新生成BR/>由库导入的数据文件。
推荐PyPI第三方库