問題:
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