casting with selectors on arrays and structs #6459
-
I have tables with various timestamp columns. I need to make them all consistent, so I'm running something like: t.mutate(
s.across(
s.of_type("timestamp"),
lambda x: x.cast(dt.Timestamp(timezone=None)),
)
) I want to apply this to any timestamp column within a struct (or an array of structs). is this possible? |
Beta Was this translation helpful? Give feedback.
Answered by
cpcloud
Jul 26, 2023
Replies: 2 comments 3 replies
-
Is there any reason you need to cast them prior to using them? Why not cast when you access the field? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Closing this out for now! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cpcloud
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Closing this out for now!