GithubHelp home page GithubHelp logo

s-yoshiki / kenall Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 34 KB

日本郵政が提供している郵便番号ファイル(通称: KEN_ALL.csv)のPython用パッケージ

License: MIT License

Python 100.00%
python python3 kenall

kenall's Introduction

kenall (KEN_ALL.csv Parser for 日本郵政)

unit-test-ci

codecov

Description

日本郵政が提供している郵便番号ファイル(通称: KEN_ALL.csv)をパースするPython用パッケージです。

特徴

  • 複数行に分割された行をマージします
  • 不要な情報を除去します
  • 地域名の中の市町村名やビル名などの詳細情報を抽出します
  • 半角カナを全角カナに変換します
  • 全角数字を半角数字に変換します

Installation

$ pip install kenall

Usage

import kenall

# Iterator objects
postal = kenall.Parser(path="./KEN_ALL.csv")

for item in postal:
    print(item.pref)          # 県名
    print(item.pref_kana)     # 県名カナ
    print(item.region)        # 市区町村名
    print(item.region_kana)   # 市区町村名カナ
    print(item.district)      # 郡名
    print(item.district_kana) # 郡名カナ
    print(item.city)          # 市名
    print(item.city_kana)     # 市名カナ
    print(item.ward)          # 区名
    print(item.ward_kana)     # 区名カナ
    print(item.town)          # 町域名
    print(item.town_kana)     # 町域名カナ
    print(item.build)         # ビル名
    print(item.build_kana)    # ビル名カナ
    print(item.floor)         # ビル階層
    print(item.dict)          # dictionary形式で取得

Interface

Link

Acknowledgements

License

MIT

このソースコードの使用にて生じた故障又は損害などに関しては一切の責任を負いかねます。

kenall's People

Contributors

s-yoshiki avatar hirokiky avatar

Stargazers

SHIFT Yoshiki SHINAGAWA avatar  avatar

Watchers

James Cloos avatar  avatar SHIFT Yoshiki SHINAGAWA avatar

Forkers

hirokiky

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.