-
I have a data frame that has columns containing a space in the name. I'd like to update those columns inside a mutate but can't seem to figure out how to do it. I was thinking something like this but I get an error saying the expression cannot contain an assignment:
Is this possible in some way? |
Beta Was this translation helpful? Give feedback.
Answered by
cpcloud
Oct 31, 2024
Replies: 1 comment 1 reply
-
Yes, like this: .mutate({"SOM COL": _["SOM COL"].fill_null(0) + 200})
.mutate(**{"SOM COL": _["SOM COL"].fill_null(0) + 200}) These two lines have equivalent behavior. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cpcloud
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, like this:
These two lines have equivalent behavior.