cancel
Showing results for 
Search instead for 
Did you mean: 

string data is read as numeric from CSV

string data is read as numeric from CSV

Hello All

 

I have a dataset which consists of identifier features to create relation. But when I upload the data in AI Catalog the text data is converted to string even though the CSV has quotes around string

 

example

 

"0423143314" is converted to 423143314

 

have the same problem in excel file also. 

 

Using pandas to create the export of CSV and excel

 

df.to_csv("Data\model_data_sw_12.csv", index=False, quotechar='"', quoting=csv.QUOTE_NONNUMERIC)

 

please provide a solution for this.

Labels (2)
0 Kudos
1 Reply

Hi Lokesh!

You might have faced rare drawback of automated type parsing. 
But solution might be pretty simple - just put some non-numeric sign in front of your ID, for example #0423143314 will prevent from converting to numeric and will be easy enough to parse back.