Closed sehHeiden closed 6 months ago
strptime
will work in this scenario if you provide the string format:
["2023-08-29T17:39:43", "2023-08-29T17:20:09"]
|> S.from_list()
|> S.strptime("%Y-%m-%dT%H:%M:%S")
# #Explorer.Series<
# Polars[2]
# datetime[μs] [2023-08-29 17:39:43.000000, 2023-08-29 17:20:09.000000]
# >
I'll leave this issue open for now. cast
should probably not have this responsibility since datetime strings can vary so much. However, there might be an exception for iso8601
formatted strings.
Thoughts, Explorer team?
Yes, I think we should make it work. The documentation says it does but I assume it stopped working at some point.
Thoughts, Explorer team?
@cigrainger, @philss and I would like to invite you to the team, given your fantastic contributions. No strings attached. :)
Yes, I think we should make it work. The documentation says it does but I assume it stopped working at some point.
Oh nice! Where's it documented? I looked here but I didn't see it.
@cigrainger, @philss and I would like to invite you to the team, given your fantastic contributions. No strings attached. :)
I'm honored, I accept! I look forward to being a part of this all star cast :)
In strptime we mention that "cast(..., :datetime)" will guess. I guess we should probably implement it by calling to_datetime
if we know the source is dtype=string. (similar for date and perhaps time dtypes).
Haha oh golly it was in the function that I linked (you sure you want me on this team? 😉). Yes I think that means this was a regression of some sort.
I guess we should probably implement it by calling
to_datetime
if we know the source is dtype=string. (similar for date and perhaps time dtypes).
Agreed.
Want to cast:
Input is:
I get:
To use a Enum and cast with NaiveDateTime.from_iso6801 works: