所以我正在用 Python 学习 Udemy 的数据科学课程,但情节发生了一些奇怪的事情。上图第一个是我的,第二个是导师。
如何摆脱侧面的空白,在 pandas 中使用绘图功能时,它们似乎是默认的。
编辑:这是所有的代码。一切基本上都是默认的,所以我猜 matplotlib 在新版本的包中更改了一些默认设置。df3 文件在这里https://github.com/sxsheng/Udemy
代码:
import pandas as pd
import matplotlib.pyplot as plt
df3 = pd.read_csv('df3')
%matplotlib inline (This line is to be used in jupyter notebooks to display plots)
df3['a'].plot.hist()

