Skip to main content

cjk-data-profiling

cjk-data-profiling is a context-manager package for generating ydata-profiling / fg-data-profiling reports with Japanese, Chinese, or Korean text. It temporarily configures CJK fonts for Matplotlib and WordCloud and prevents report interaction DOM-ID collisions caused by column names.

Installation

pip install cjk-data-profiling

Install the optional profiling dependency when needed:

pip install "cjk-data-profiling[profiling]"

Usage

Wrap report generation in cjk_data_profiling.

import pandas as pd
from data_profiling import ProfileReport

from cjk_data_profiling import cjk_data_profiling

dataframe = pd.DataFrame({"city": ["東京", "大阪"]})

with cjk_data_profiling("ja"):
    report = ProfileReport(dataframe)
    report.to_file("report.html")

Language-specific values are "ja", "zh-cn", "zh-tw", and "ko". Use the additional "mixed" value only when a Noto Sans CJK font is installed; it requires one font that covers Japanese, Chinese, and Korean text.

To prefer a different installed font, replace the candidate list for the relevant language before entering the context. The selected font must include the CJK characters used by the report.

from cjk_data_profiling import FONT_CANDIDATES, cjk_data_profiling

FONT_CANDIDATES["ja"] = ["Yu Gothic", "Meiryo"]

with cjk_data_profiling("ja"):
    ...

All compatibility patches are enabled by default. To opt out of one, pass its keyword-only switch. For example, leave WordCloud's default font unchanged:

with cjk_data_profiling("ja", enable_wordcloud=False):
    report = ProfileReport(dataframe)

The available switches are enable_matplotlib, enable_wordcloud, and enable_slugify.

The context temporarily changes process-wide Matplotlib and WordCloud defaults, as well as the installed profiling package's report-structure DOM-ID helper. Concurrent report generation from multiple threads in the same process is not supported. Both this package and fg-data-profiling temporarily modify Matplotlib global state while rendering. Do not make this context active in overlapping threads, including with different languages. If reports must be generated concurrently, use separate processes. For threaded applications, serialize the complete report-generation operation with an application-level lock instead.

Testing

pytest
pytest -m integration

Run the non-integration suite on every supported Python version locally:

uv sync --group dev
uv run tox

tox obtains Python 3.11, 3.12, 3.13, and 3.14 through uv, then runs pytest -m "not integration". Report-generation integration tests remain opt-in. The interaction-selector integration test writes *-interaction-selectors.html files to test_output/integration-reports/. Open one in a browser to manually confirm that every Interaction selector, including "a b", "a-b", and CJK column names, displays its matching plot.

Integration reports and WordCloud images are written to test_output/integration-reports/ and are ignored by Git.

Metadata

Release files for cjk-data-profiling 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjk-data-profiling 0.2.0
File Size Uploaded
cjk_data_profiling-0.2.0.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cjk-data-profiling 0.2.0
File Interpreter ABI Platform
cjk_data_profiling-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / cjk_data_profiling-0.2.0.tar.gz

Download URL cjk_data_profiling-0.2.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce7ee0374f081ae6849e0d378a2f4595b50e84ed5cc27ab3a2e08486cb299f86
BLAKE2b-256 checksum
How to use checksums
c96a0bcefc1907f1a8d4f4c43602b9b7e2ed0d9258ad925003393f08d17480c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cjk_data_profiling-0.2.0-py3-none-any.whl

Download URL cjk_data_profiling-0.2.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a11c8b6719ecd00b3c5e3224b2c0d19688a31c32553ade8100cff843732cc7c8
BLAKE2b-256 checksum
How to use checksums
ac73cf85e2ff47341641f0463d6937ffd89311158118e8fe43d2593d6be65027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page