Plotting a Spatially Enabled DataFrame w/ datetime column with all NaT values causes exception

07-30-2019 01:46 PM
Occasional Contributor II

This isn't really a question since this might be the expected behavior, but since I spent a good chunk of time pinpointing the problem, figured I'd share.

I was playing around with SEDFs and had some issues plotting a SEDF that had NaT datetime values. The error it gave was 

  • AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas

This seems to only be an issue if all the values in a datetime column are NaT. I won't go into details why, but there was a datetime column that didn't have a single valid datetime value, all values were null/NaT.

So, the following line of code was causing the error

0 Replies