0

I am trying to import a txt file which has around 56 columns and has different data types.

Few columns have values with prefix 000, which I cannot see once the data has been imported.

I am also getting the error message "specify dtype option on reading or set low_memory=false".

Values in certain columns have changed to "NaN" & "4.40578e+01", which is not correct...

I want the data to be imported and displayed correctly.

This is code that I am using

from os import os path
import numpy as np
import pandas as pd
df=pd.read_csv(r"C:\Users\abc\desktop\file.txt",sep=",")
df.head()
sophros
  • 14,672
  • 11
  • 46
  • 75
ssks
  • 1
  • 1
    Does this answer your question? [Pandas read\_csv low\_memory and dtype options](https://stackoverflow.com/questions/24251219/pandas-read-csv-low-memory-and-dtype-options) – Henrique Branco Mar 26 '20 at 18:38
  • Check [this link](https://stackoverflow.com/questions/24251219/pandas-read-csv-low-memory-and-dtype-options). Somebody has already answerd your question. – Henrique Branco Mar 26 '20 at 18:39

0 Answers0