0

I am trying to join one CSV file and one shapefile.

This is the shapefile attribute table:

shapefile attribute table

and this is the CSV file.

CSV file

I am getting this as the result:

join result

Does anyone know why I am getting null values in the TyincomeUsa_In... column?

enter image description here

Edit: What all options do I check in this for the given problem in the case of this CSV data

  • 1
    what are the fields your using to join on, and what are their data types (int, string, etc?) – bcollins Dec 14 '16 at 5:42
3

You are getting null values because the COUNTYNS in shapefile starts with "00" while in CSV file there is "00", which means the there is no common field IDs between shapefile and CSV file. You need to change the type of COUNTYNS field in CSV file from integer number to text and add "00" before each number. Excel will help you to do this job.

  • It was probably Excel that CAUSED the problem. Excel tries to infer types and probably thought that field should be numeric. – bcollins Dec 14 '16 at 5:46
  • 1
    You can use TEXT Function (fx) to change the cell to string. You can refer to this help on how to do that: extendoffice.com/documents/excel/… – ahmadhanb Dec 14 '16 at 5:51
  • @ahmadhanb can u help me what options should i check while creating a layer frm delimted file in this case – udAyKumArVermA Dec 14 '16 at 7:46
  • How did you save your file? Is it CSV or other delimited file? – ahmadhanb Dec 14 '16 at 8:20
  • as csv ,its csv file – udAyKumArVermA Dec 14 '16 at 9:00
0

COUNTYNS in the shapefile is a string field and your CSV is a numeric or int field would be my guess. Thats why they are all null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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