cnparser
cnparser is a python library for loading and enrichment Corporate Number Publication Site data that is provided from National Tax Agency Japan. cnparser only support to parse latest data now.
Installation
cnparser is available on pip installation.
$ python -m pip install cnparser
GitHub Install
Installing the latest version from GitHub:
$ git clone https://github.com/new-village/cnparser
$ cd cnparser
$ python setup.py install
Usage
This section demonstrates how to use this library to load and process data from the National Tax Agency's Corporate Number Publication Site.
Direct Data Loading
To download data for a specific prefecture, use the load function. By passing the prefecture name as an argument, you can obtain a DataFrame containing data for that prefecture.If you wish to download data for a specific prefecture, you must specify the prefecture name in Roman characters (list of the supported prefectures).
To execute the load function without specifying any arguments, data for all prefectures across Japan will be downloaded.
>>> import cnparser
>>> df = cnparser.load("Shimane")
CSV Data Loading
If you already have a downloaded CSV file, use the read_csv function. By passing the file path as an argument, you can obtain a DataFrame with headers from the CSV data.
>>> import cnparser
>>> df = cnparser.read_csv("path/to/data.csv")
Data Enrichment Functionality
The enrich function standardises and transforms the values of specific fields in the loaded DataFrame.
>>> import cnparser
>>> df = cnparser.enrich(df)
The functions perform all processing, but it is possible to apply only specific processing by defining specific processing as an argument.
>>> import cnparser
>>> df = cnparser.enrich(df, "enrich_kana" ...)
The processes supported by the enrich function are as follows:
enrich_kana: Function that adds a standardized furigana columnfuriganato the DataFrame. It handles data entry by convertingnameto kana, iffuriganais NaN. Note that currently only kanji and katakana conversions are supported. Alphabet conversions are not supported.enrich_kind: Function that adds thekindlabel to thelegal_entity.enrich_post_code: Function that adds the formatted postcode as XXX-XXX topost_code.
Metadata
Release files for cnparser 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cnparser-1.7.0.tar.gz | 14.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cnparser-1.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / cnparser-1.7.0.tar.gz
| Download URL | cnparser-1.7.0.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa7608b2968d228f87515f3b96555f6b5fefe19c7cab852d9f5e4955eb2e8988
|
|
BLAKE2b-256 checksum How to use checksums |
ead86f2ecb469371afa6950a5b83c6d09929742a202cbc803d8efdf39250d919
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / cnparser-1.7.0-py3-none-any.whl
| Download URL | cnparser-1.7.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87b3cef2a295e066dde1294777ae5c610a56d3c6e81916724c0311d279523809
|
|
BLAKE2b-256 checksum How to use checksums |
702eeafe7fb6f745e3117b3071223cac3ff38c26340f804f813bd53288419fea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for cnparser 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.