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.
Try "None" without surrounding quotes (it's also case-sensitive).
Do you check if the field is nullable or not?
In summary, make sure the field is nullable and you use the python parser when typing ... None ....
since None is a python object for sure... not sure about other parsers.
Null in VB.
don't encourage vb Joe
:O But it is so readable and understandable unlike Python
Python is very user friendly
Just like Perl! Even though I respectfully disagree! I find it to be an awful language...but who am I to say... the masses embraced it so in order to progress I have to deal with it!
Come on Ted... you are getting behind... more on the horizon for instance... https://julialang.org/
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-sensitive2) use the python parser
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
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
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
Retrieving data ...