pandas error记录随笔

python学习网 2018-02-11 06:23:01

1.sys:1: DtypeWarning: Columns (0,1) have mixed types. Specify dtype option on import or

解决办法:PANDAS默认使所占用空间最小的类型来储存数据。df = pd.read_csv('XXX.csv', low_memory=False)

2.comparing dtype [float64] array with a scalar of type [bool] in Pandas DataFrame

符号很重要:These must be grouped by using parentheses.

sof = DF[DF[u'8']>0.125&DF[u'8']<0.25]加括号 

 

阅读(752) 评论(0)