Python 将数据帧头(5)、统计数据和绘图另存为图片输出

Python 将数据帧头(5)、统计数据和绘图另存为图片输出,python,pandas,matplotlib,jupyter-notebook,Python,Pandas,Matplotlib,Jupyter Notebook,有没有办法将它们保存为png或其他图像输出? 输出图像需要包括: df.head(5) df[column].describe() distribution plot or histogram plot (或任何其他绘图…以下是您想要实现的示例: fig,ax=plt.子批次(2,2,figsize=(20,10)) #隐藏轴 #图补丁设置_可见(假) ax[0][0]。轴(“关闭”) ax[0][1]。轴(“关闭”) ax[0][1]。轴(“紧”) ax[0][0]。轴(“紧”) df=pd

有没有办法将它们保存为png或其他图像输出?
输出图像需要包括:

df.head(5)
df[column].describe()
distribution plot
or histogram plot

(或任何其他绘图…

以下是您想要实现的示例:

fig,ax=plt.子批次(2,2,figsize=(20,10))
#隐藏轴
#图补丁设置_可见(假)
ax[0][0]。轴(“关闭”)
ax[0][1]。轴(“关闭”)
ax[0][1]。轴(“紧”)
ax[0][0]。轴(“紧”)
df=pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'))
ax[0][0]。表(cellText=df.head().values,colLabels=df.columns,loc='center'))
ax[0][1]。表(cellText=df.descripe().values,colLabels=df.descripe().columns,rowLabels=df.descripe().index,loc='center')
df.plot(kind='hist',ax=ax[1][0])
df.plot(kind='box',ax=ax[1][1])
图1紧_布局图()
plt.show()

以下是您想要实现的一个示例:

fig,ax=plt.子批次(2,2,figsize=(20,10))
#隐藏轴
#图补丁设置_可见(假)
ax[0][0]。轴(“关闭”)
ax[0][1]。轴(“关闭”)
ax[0][1]。轴(“紧”)
ax[0][0]。轴(“紧”)
df=pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'))
ax[0][0]。表(cellText=df.head().values,colLabels=df.columns,loc='center'))
ax[0][1]。表(cellText=df.descripe().values,colLabels=df.descripe().columns,rowLabels=df.descripe().index,loc='center')
df.plot(kind='hist',ax=ax[1][0])
df.plot(kind='box',ax=ax[1][1])
图1紧_布局图()
plt.show()

不客气。请考虑赞成和接受别人的答案:“伟大的答案,我对此感兴趣!”谢谢你,朱利安,我终于可以投票了…不客气。请考虑赞成和接受别人的答案:“伟大的答案,我对此感兴趣!”谢谢你,朱利安,我终于可以投票了…哈哈