Successfully solved sys:1 : DtypeWarning: Columns (39,41,42,217) have mixed types.Specify dtype option on import or set low_ memory=False.
Problem solving
sys:1 : DtypeWarning: Columns (39,41,42,217) have mixed types.Specify dtype option on import or set low_ memory=False.
Solutions
sys:1 : dtype warning: columns (39, 41, 42217) have mixed types
Solutions
Because when pandas library reads the CSV file, because it involves the difference of memory of different computer hardware, it reads by block by default, not all of them are read at one time. Then, when pandas reads different blocks, if the data types in a field are not consistent, this warning will appear
The
pd.read_ CSV (test001. CSV ‘)
is changed to
PD. Read_ csv(test001.csv’, low_ memory=False)
Done!
Similar Posts:
- Python Pandas: Read_Excel() and to_Excel() function
- Python: How to Read file initialization from file failed by panda
- Python pandas merge cannot merge two data frames based on column names (Key Error)?
- How to Solve ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3
- Tensorflow error due to uninitialized variable [How to Fix]
- [Solved] Pandas Read CSV Error: TypeError: Empty ‘DataFrame’: no numeric data to plot
- How to Solve R Error: Can’t bind data because some arguments have the same name (The R Programming Language)
- C# Unable to translate set operation when matching columns on both sides have different store types
- [Solved] elastic search, blocked by: index read-only/allow delete (api)
- pandas.read_ Oserror: initializing from file failed