I have a shapefile that contains a field of decimal numbers between 0 and 1. I wanted to stylise based on the numeric value however the "null" values of the field have defined it as a text field so won't give me that option.
I thererefore need to have the contents of that field defined as numeric. I have deleted the null values so everything is now a decimal number and am trying to find an easy(ish) way to convert the field from text to numeric.
The best way to do this seemed to be to create a new numeric field in ArcGIS Pro and then use field calculation to populate it with the contents of the current text field. This has half worked as I've been able to copy those numbers across to the new field but the issue is that it has rounded anything below 1 down to 0. It shouldn't be doing this as I have included 2 decimal places in the new field structure.
Any ideas on how I can resolve this without having to create a new csv file and link it?
-
Shape files do not allow null values, so please clarify what type of data source you are working with.bixb0012– bixb00122024年08月29日 13:38:38 +00:00Commented Aug 29, 2024 at 13:38
1 Answer 1
I would say the sequence you have done is correct, although I found I had to select the rows that were not null to run the calculate field tool, otherwise it errored on the null value.
So I added a field of type double, set precision to 7 and scale to 2 then ran the following below. I did not get any rounding.
Explore related questions
See similar questions with these tags.