作者ggggggh (ggggggh)
看板Python
標題[問題] error 問題 看不懂
時間Tue Jan 8 12:45:05 2019
是這樣的
我用jupyter notebook
跑下面這樣的 code
import pandas as pd
df = pd.read_csv('XXXXX.csv')
會出現下面的error code
C:\Users\yuc68181\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py:2728:
DtypeWarning: Columns (10,36,44) have mixed types. Specify dtype option on
import or set low_memory=False.
interactivity=interactivity, compiler=compiler, result=result)
這是什麼意思阿? 感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.86.237
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1546922707.A.3FE.html
推 lajji: 檔名後面加low_memory=False看看 01/08 12:55
→ uukoQAQ: et/u010212101/article/details/78017924 01/08 12:58
→ gmccntzx1: 問題出在你資料的 10, 36, 44 列(縱向)中,有不同型 01/08 13:22
→ gmccntzx1: 態的資料。通常是因為原始資料內有空值,導致讀檔時將 01/08 13:22
→ gmccntzx1: 空值轉為 nan (float),而其他資料為 str ... 之類的 01/08 13:22
→ gmccntzx1: ,所以訊息才會跟你說 mixed type 01/08 13:22