【发布时间】:2021-02-09 00:36:24
【问题描述】:
所以我尝试为数据集中的每个特定变量创建直方图,然后将其保存为 PNG 文件。
我的代码如下:
import pandas as pd
import matplotlib.pyplot as plt
x=combined_databook.groupby('x_1').hist()
x.figure.savefig("x.png")
我不断收到“AttributeError: 'Series' object has no attribute 'figure'”
【问题讨论】:
标签: python pandas matplotlib plot histogram