pandas error记录随笔
程序员文章站
2022-04-09 21:00:10
1.sys:1: DtypeWarning: Columns (0,1) have mixed types. Specify dtype option on import or 解决办法:PANDAS默认使所占用空间最小的类型来储存数据。df = pd.read_csv('XXX.csv', low ......
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]加括号