为什么下面的脚本不起作用?如何在同一图中匹配 groupby 箱线图和 DataFrame 图?
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
fig, axes = plt.subplots(1, 1, figsize=(15, 15))
n = 480
ts = pd.DataFrame(np.random.randn(n), index=pd.date_range(start="2014-02-01",periods=n,freq="H"))
ts.groupby(lambda x: x.strftime("%Y-%m-%d")).boxplot(subplots=False, rot=90, ax = axes)
ts.plot(ax = axes)
plt.show()