bar_char_race_cn库
解决bar_chart_race库不支持中文的问题
安装
pip install bar_char_race_cn
注意:
使用前需提前安装ffmpeg
使用
请到github下载测试数据
import pandas as pd
df = pd.read_csv('data/财政收入.csv')
def year2timestamp(year):
#转为可比较大小的日期格式
return pd.Timestamp(str(year))
df['year'] = df['year'].apply(year2timestamp)
df.set_index('year', inplace=True)
df.sort_index(inplace=True) #日期从小到大排序
import bar_chart_race_cn as bcr
bcr.bar_chart_race(df=df,
filename='近20年各省财政收入.mp4',
title='近20年各省财政收入(单位: 亿元)'
)
更多
-
公众号:大邓和他的python
-
支持一下
Metadata
Release files for bar-chart-race-cn 0.11
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 | |
|---|---|---|---|---|
| bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz | 296.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bar_chart_race_cn-0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 450.1 kB
Release files / bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz
| Download URL | bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz |
|---|---|
| Size | 296.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a105cd1dda4713834c6a7efbeb8af29ee1840c7a48955c6fd0852628bc51ca5b
|
|
BLAKE2b-256 checksum How to use checksums |
c0b7abbb9df66fadef7c05b32727cdd1967a6564872468586da178d984827f95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
|
Release files / bar_chart_race_cn-0.11-py3-none-any.whl
| Download URL | bar_chart_race_cn-0.11-py3-none-any.whl |
|---|---|
| Size | 153.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33c5bf53522bf2ea652bf58d336aae4ce466bf525cade51069cb9e445d0ce32c
|
|
BLAKE2b-256 checksum How to use checksums |
28ebc3754eca3f643f78a08b564ab57a377d41e4729bd49dd2b3aa2c3d53e5ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
|
Security for bar-chart-race-cn 0.11
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.