0

This question already has an answer here:

I have imported a .csv file containing unique identifiers with two decimal places (e.g. 53500001.00, 53500001.01 etc.). I am joining this file to a vector file with the same identifiers. However, when I import the .csv file the identifiers ending with .00 have been reduced to integers in the attribute table and the join returns null values in those instances.

It is census data so I can't go back through and manually change this as it's hundreds of thousands of lines. Is there a way to change the precision of the attribute table similar to in excel?

marked as duplicate by whyzar, Dan C, John Powell, PolyGeo Sep 5 '17 at 22:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    related gis.stackexchange.com/questions/109869/… – Mapperz Sep 5 '17 at 16:01
  • 2
    Do you mean that you have identifiers which are of datatype "real"? It feels odd. Could it rather be that what look like numbers in census data are rather strings "53500001.00". If you deal with numbers then 53500001.00=53500001. But if identifiers are strings then your real consern is how to import strings which contain only numbers as strings. – user30184 Sep 5 '17 at 17:23
1

The two solutions / possible duplicates mentioned above will not work because they assume the data made it into QGIS intact, which in this case, it is not...

I think you should look into use a CSVT:

https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/

Also: how are you adding your CSV to the map?

  • I'm adding the .csv through Layer>Add Layer>Add Delimited Text Layer. I'll take a crack at it with the csvt file. – Landon Black Sep 6 '17 at 12:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.