How do I convert a field value to NULL? I tried Calculate. Not sure how to use Python = "none" but I could not get it to work.
Thanks.
Stew
Solved! Go to Solution.
That looked interesting.... I did like Fortran
maybe something like this.
In above example, the value of 0 is replaced by <Null>
Reply to all,
Thanks very much for the help! There were two parts to the solution using the Field Calculator to enter "None".
1) case-sensitive
2) use the python parser
Stew
Stewart... also remember in Python and for fields that are 'nullable'
there is only one .... None ....
you use it for all field types... text, numbers etc
https://community.esri.com/blogs/dan_patterson/2016/11/03/before-i-forget-18-those-pesky-null-things
and who said there is nothing more to learn about nothing
If you are trying to handle missing data usually Data Scientists like me advise to use np.nan because of this:
python - What is the difference between NaN and None? - Stack Overflow
for consistency i would recommend this:
myfieldvalue=np.nan otherwise you can do else.
This has also been brought up before in the context of geometry definitions, but probably too late to implement any changes
https://community.esri.com/blogs/dan_patterson/2018/01/12/point-of-view-on-points
Ok, really wasn't considering the point(geometry) fields. So while for non point(geometry) fields perhaps is a good idea to consider np.nan, for point(geometry) fields go with math.nan accordingly.
for vector geometry, I simply use numpy arrays with np.nan and I can convert back and forth between arc* geometry using a variety of means.
But I suspect this should be a separate thread
hence what i originally posted accordingly