Pandas read_csv low_memory 和 dtype 選項 - Pandas read_csv low_memory and dtype options

問題:

When calling打電話時

df = pd.read_csv('somefile.csv')

I get:我得到:

/Users/josh/anaconda/envs/py27/lib/python2.7/site-packages/pandas/io/parsers.py:1130: DtypeWarning: Columns (4,5,7,16) have mixed types. /Users/josh/anaconda/envs/py27/lib/python2.7/site-packages/pandas/io/parsers.py:1130: DtypeWarning: 列 (4,5,7,16) 具有混合類型。 Specify dtype option on import or set low_memory=False.在導入時指定 dtype 選項或設置 low_memory=False。

Why is the dtype option related to low_memory , and why would making it False help with this problem?爲什麼dtype期權相關low_memory ,爲什麼會使其False幫助解決這個問題?


解決方案:

參考一: https://stackoom.com/question/1dkqh
參考二: Pandas read_csv low_memory and dtype options
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章