acorr_ljungbox(data, lags = 1)报错:ufunc 'isnan' not supported for the input types, and the inputs cou

报错信息:ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

dataframe数据类型object是和实际数据类型int匹配,转换一下就OK了

df['A'] = df['A‘].astype(int)

 

你可能感兴趣的:(网页代码参考,python,ljungbox)