stock_sales = pdread_csv comp_dir traincsv usecols=Data_ID Time Close_Price dtype= Data_ID int Close_Price float32 parse_dates=Time infer_datetime_format=Trues = stoc
将代码中的plot_periodogram(s)改为plot_periodogram(s.values)即可。这是因为stack()操作返回的是一个Period类型的Series,而plot_periodogram()函数需要的是一个numpy数组,因此需要使用.values来获取numpy数组。
原文地址: https://www.cveoy.top/t/topic/flCJ 著作权归作者所有。请勿转载和采集!