简单的Python动态可视化神器,编程小白也能上手
作者:野客 时间:2021-05-28 09:59:27
最近发现了一个宝藏动态可视化库,非常简单,即使是小白也能轻松上手。这个库就是motionchart
,它能够用 pandas
的 dataframe
数据直接创建交互式的动态图表,下面来简单看一下如何使用。
1、安装模块
pip install motionchart
2、导入模块
from motionchart.motionchart import MotionChart, MotionChartDemo
3、导入数据
import pandas as pd
data=pd.read_csv('data.csv')
data
4、显示图表
from motionchart.motionchart import MotionChart
mc = MotionChart(df = data,
title = "data",
key = 'year',
x = 'data1',
y = 'data3',
size = 'data2')
mc.to_notebook()
来源:https://zhuanlan.zhihu.com/p/417293629
标签:Python,动态,可视化
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python chardet库识别编码原理解析
2021-03-18 16:41:54
django中ORM模型常用的字段的使用方法
2022-11-02 03:26:15
Python调用Tkinter示例浅析
2022-04-30 02:53:32
![](https://img.aspxhome.com/file/2023/9/79599_0s.png)
Python Pandas中缺失值NaN的判断,删除及替换
2021-08-27 22:10:23
编写python程序的90条建议
2022-04-30 00:36:22
Python 机器学习工具包SKlearn的安装与使用
2023-11-10 13:13:05
![](https://img.aspxhome.com/file/2023/4/103344_0s.png)
js与jquery获取父元素,删除子元素的两种不同方法
2023-10-07 04:08:00
Python编程中的异常处理教程
2022-10-16 04:26:23
运行SQL Server的计算机间移动数据库
2009-01-20 13:07:00
python通配符之glob模块的使用详解
2021-07-16 23:13:18
彻底弄懂CSS盒子模式之四(绝对定位和相对定位)
2007-05-11 16:51:00
python中字符串的操作方法大全
2023-10-01 17:47:15
Python实现笑脸检测+人脸口罩检测功能
2022-06-24 04:01:49
![](https://img.aspxhome.com/file/2023/4/87474_0s.png)
PHP排序二叉树基本功能实现方法示例
2023-07-10 04:45:53
pandas进行时间数据的转换和计算时间差并提取年月日
2021-03-14 02:22:22
![](https://img.aspxhome.com/file/2023/7/109477_0s.png)
客户体验
2008-12-11 13:58:00
Python异常处理知识点总结
2023-01-04 16:03:36
一些需要禁用的PHP危险函数(disable_functions)
2023-11-23 15:29:25
使用Python绘制图表大全总结
2022-08-09 20:35:27
![](https://img.aspxhome.com/file/2023/7/99517_0s.png)
基于insertBefore制作简单的循环插空效果
2023-08-17 22:34:17
![](https://img.aspxhome.com/file/2023/2/55932_0s.png)