I'm processing a csv file. Source file contain value as '20190801'. Pandas detects it as int
or float
for different files. But before writing the output, I convert all columns to string and datatype shows all columns as object. But the output containing .0
at the end. Why is that?
e.g: 20190801.0
for col in data.columns:
data[col] = data[col].astype(str)
print(data.dtypes) <-- prints all columns datatypes as object
data.to_csv(neo_path, index=False)