[問題] python型別轉換
大家好,我想把train_X裡的資料全部統一成float,但試了很久依舊跑出ValueError: could not convert string to float: 'X',不太懂問題出在哪。
http://i.imgur.com/ndjNC8M.png
用了astype也一樣
http://i.imgur.com/Dxx1KsU.png
對了,train_X是ndarray
http://i.imgur.com/4sb4zCd.png
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 110.50.175.10 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1592123899.A.CDC.html
推
06/14 16:57,
3年前
, 1F
06/14 16:57, 1F
好 感謝
※ 編輯: Ryan45758 (110.50.175.10 臺灣), 06/14/2020 17:06:22
→
06/14 18:19,
3年前
, 2F
06/14 18:19, 2F
→
06/14 23:57,
3年前
, 3F
06/14 23:57, 3F
→
06/15 14:18,
3年前
, 4F
06/15 14:18, 4F
→
06/29 16:14,
3年前
, 5F
06/29 16:14, 5F