Skip to main content

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年各省财政收入(单位: 亿元)'
                  )

更多

支持一下

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz (296.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bar_chart_race_cn-0.11-py3-none-any.whl (153.3 kB view details)

Uploaded Python 3

File details

Details for the file bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz.

File metadata

  • Download URL: bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz
  • Upload date:
  • Size: 296.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for bar_chart_race_cn-0.11.macosx-10.9-x86_64.tar.gz
Algorithm Hash digest
SHA256 a105cd1dda4713834c6a7efbeb8af29ee1840c7a48955c6fd0852628bc51ca5b
MD5 6b85d0036ce09dc56ca5c188ea0fb017
BLAKE2b-256 c0b7abbb9df66fadef7c05b32727cdd1967a6564872468586da178d984827f95

See more details on using hashes here.

File details

Details for the file bar_chart_race_cn-0.11-py3-none-any.whl.

File metadata

  • Download URL: bar_chart_race_cn-0.11-py3-none-any.whl
  • Upload date:
  • Size: 153.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for bar_chart_race_cn-0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 33c5bf53522bf2ea652bf58d336aae4ce466bf525cade51069cb9e445d0ce32c
MD5 bdba432af60b1824eae5fe37d3f0da09
BLAKE2b-256 28ebc3754eca3f643f78a08b564ab57a377d41e4729bd49dd2b3aa2c3d53e5ff

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.11 This release

2 files

0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page