数据可视化是数据分析的重要环节。
Matplotlib基础
import matplotlib.pyplot as plt
plt.figure(figsize=(10, 6))
plt.plot(x, y, label='data')
plt.xlabel('X轴')
plt.title('示例图表')
plt.legend()
plt.savefig('chart.png')Seaborn进阶
import seaborn as sns
sns.set_style('whitegrid')
sns.barplot(x='category', y='value', data=df)
评论 (0)
暂无评论,来发表第一条评论吧!
发表评论