-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date(::String, ::DateFormat) isn't type stable #13644
Comments
Oh man, I think that the DateTime version of this is the cause of a strange issue I've been seeing related to different number of unique rows in the same DataFrame before and after saving to a csv and reloading. Good catch. |
Umm.....I don't think that should happen. The key issue here is just that type inference isn't able to know that a |
After 94b2b20, things got a little better: julia> @code_warntype Date("2015-01-01",Dates.DateFormat("yyyy-mm-dd"))
Variables:
dt::ASCIIString
df::Base.Dates.DateFormat
Body:
begin # dates/io.jl, line 205:
return (top(_apply))((top(getfield))(Base.Dates,:call)::F,Base.Dates.Date,(Base.Dates.parse)(dt::ASCIIString,df::Base.Dates.DateFormat)::Array{Any,1})::Any
end::Any |
@quinnj I wasn't able to reproduce this in a simple case, and I recently moved over to using SQLite as a backend, so I don't see it in my actual data anymore. You're probably right that this was due to something else. My other theory was that it was related to columns with element type Any containing multiple string types, but it looks like that's not the case either. Dunno. |
Fixed:
I believe the recent work on the Date parsing has sufficient coverage for this. |
Placeholder issue so I remember:
The text was updated successfully, but these errors were encountered: