I'm trying to add join csv to an attribute table of a layer based on a 15 character number for US census blocks. However the GEOID (15 char) field in the layer is a text field, creating a double or long duplicate field translates the 15 digits into scientific notion which incorrectly pairs during add join.
Strange, I thought the CSV would store it as a string. Probably try putting the CSV into an FGDB table, ensure the field type is text (field calculate a new field if not - str(int(<value>)) ) or CSV to xls and set the format to text.
Okay so, I think I understand a little better what's happening. GEOID is 15 digits using str(int(<value>)) works, however the final two digits are disregarded- And they are essential. The first two digits however are not essential. So after a little looking around- it appears that str(int(!GEOID10!))[2:] will work just fine.
That said, I'm painfully new to all this so if someone can enlighten me as to *why* I'd be super grateful.
Doesn't make sense to me either unless you have a default field length of 15 set (which would explain why its being truncated)? are you able to share a sample of the data?