-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fiona no longer recognizes pd.Timestamp (as datetime.datetime) since 1.10 a2 #1376
Comments
Enabling logging gives:
This is because of using Lines 762 to 765 in 6581da6
|
@jorisvandenbossche thanks for the report. Sorry about this, I'll make sure it's fixed for 1.10b1. |
GeoPandas CI is green again! |
Example that works with released fiona, using a
pd.Timestamp
scalar in the data passed towriterecords
for a "datetime" field:Starting with 1.10 a2, this seems to silently drop that column:
If I use
datetime.datetime.fromisoformat(..)
instead ofpd.Timestamp(..)
in the code above (i.e. passing adatetime.datetime
object), then it works again.But
pd.Timestamp
is subclass ofdatetime.datetime
(and so things likeisinstance(value, datetime.datetime)
should work), and this worked in the past.We are running into this issue in GeoPandas' CI because we pass the result of
GeoDataFrame.iterfeatures()
towriterecords
. And it seems that this is creating a json-like structure that usespd.Timestamp
instead ofdatetime.datetime
objects.The text was updated successfully, but these errors were encountered: