Hello!
A have a feature class in geodatabase with date field, containing dates bigger than 01.01.2999.
I wish to transfer my FC into Spatially Enabled DataFrame in Jupyter Notebook, but get "OutOfBoundsDatetime" error.
OutOfBoundsDatetime<SPAN class="punctuation token">:</SPAN> Out of bounds nanosecond timestamp<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">3000</SPAN><SPAN class="operator token">-</SPAN><SPAN class="number token">01</SPAN><SPAN class="operator token">-</SPAN><SPAN class="number token">01</SPAN> <SPAN class="number token">00</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="number token">00</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="number token">00</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
I also try to change datatype of the field, but this doesn't work, the error still appears.
Here's example of my code:
sdf <SPAN class="operator token">=</SPAN> pd<SPAN class="punctuation token">.</SPAN>DataFrame<SPAN class="punctuation token">.</SPAN>spatial<SPAN class="punctuation token">.</SPAN>from_table <SPAN class="punctuation token">(</SPAN>table<SPAN class="punctuation token">,</SPAN>
skip_nulls <SPAN class="operator token">=</SPAN> <SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">,</SPAN>
fields <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'id'</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">'name'</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">'date'</SPAN> <SPAN class="comment token"># the field with dates such as 3000-01-01</SPAN>
<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
null_value <SPAN class="operator token">=</SPAN> nan<SPAN class="punctuation token">,</SPAN>
dtype <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN><SPAN class="string token">'date'</SPAN><SPAN class="punctuation token">:</SPAN> object<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="comment token">#doesn`t work</SPAN>
<SPAN class="comment token"># dtype = {'date': str}, #also doesn`t work</SPAN>
<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Is this a right way to transfer date column into my Spatially Enabled DataFrame (may be ever with oblect or string type) without editing my source feature class?