pandas 报错:【sys:1: DtypeWarning: Columns (15) have mixed types. Specify dtype option on import or set low_memory=False.】
2018-08-22 14:11
981 查看
错误原因
报错提示:“sys:1: DtypeWarning: Columns (15) have mixed types. Specify dtype option on import or set low_memory=False.”
错误:类型混淆
解决
import pandas as pd pd = pd.read_csv(Your_path, low_memory=False)
关键点
low_memory
low_memory : boolean, default True # 分块加载到内存,再低内存消耗中解析,但是可能出现类型混淆。 # 确保类型不被混淆需要设置为False,或者使用dtype 参数指定类型。 # 注意使用chunksize 或者iterator 参数分块读入会将整个文件读入到一个Dataframe,而忽略类型(只能在C解析器中有效)
相关文章推荐
- [Pandas error]sys:1: DtypeWarning: Columns (0,1) have mixed types. Specify dtype option on import or set low_memory=False.
- sys:1: DtypeWarning: Columns (0,19) have mixed types. Specify dtype option on import or set low_memo
- 【pandas使用遇到的问题】 have mixed types. Specify dtype option on import or set low_memory=False.
- [Pandas error]sys:1: DtypeWarning: Columns (0,1) have mixed types. Specify dtype option on import or
- java.sql.SQLWarning: 010SK: Database cannot set connection option SET_READONLY_FALSE.
- warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for re
- warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for re
- ORA-22804: remote operations not permitted on object tables or user-defined type columns
- Warning: L6305W: Image does not have an entry point. (Not specified or not set due to multi
- Android学习系列第一弹之《warning:This text field does not specify an inputType or a hint》
- PRVF-5439: NTP daemon does not have slewing option “-x” set on node
- PRVG-11074 : Private network interface "name" on node "node" does not have MONITOR option set
- init: property_set name system.onLowMemory
- [笔记].怎样解决MDK中的警告:Warning: L6305W: Image does not have an entry point. (Not specified or not set due to multiple choices.)
- 工作随记 warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
- 关于vc调试出现One or more breakpoints cannot be set and have been disabled解决方法
- TypeError: slice indices must be integers or None or have an __index__ method
- ant 执行javac时,提示warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
- iOS-87-解决相机扫码报错*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] Unsupported type found - use -
- 关于使用renderInContext函数后,出现low memory warning解决方法