TypeError: loop of ufunc does not support argument 0 of type float which has no callable radians method
經(jīng)查詢了解到:
查詢得知問題是數(shù)據(jù)列不是數(shù)值類型,而 np.log() 函數(shù)需要輸入數(shù)值數(shù)據(jù)。查看我的數(shù)據(jù)發(fā)現(xiàn)數(shù)據(jù)對象均為 object,因此需要將數(shù)據(jù)框中的 object 數(shù)據(jù)轉(zhuǎn)換為 float 類型,文章來源:http://www.zghlxwxcb.cn/news/detail-763907.html
進(jìn)行如下操作:文章來源地址http://www.zghlxwxcb.cn/news/detail-763907.html
df = pd.DataFrame(df, dtype=float)
print(np.log(df))
到了這里,關(guān)于TypeError: loop of ufunc does not support argument 0 of type float which has no callable radians met的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!