What is the status of altering a column that has already been altered in a
@tranform block with DataFramesMeta?
I have a dataframe with some messy descriptions in years and months in spanish, and I need to do some cleaning before I can use regex to get two numeric columns for years and months.
df = DataFrame(length_of_contact = ["25 AÑOS", "5 años 9 meses", "15 años "]) df = @transform(df, length_of_contact = lowercase.(:length_of_contact), length_of_contact = replace.(:length_of_contact, "Ñ", "n"), length_of_contact = replace.(:length_of_contact, "ñ", "n"), length_of_contact = replace.(:length_of_contact, "7meses", "7 meses"))
The issue is that each time I refer to
:length_of_contact, DataFramesMeta refers to the column
:length_of_contact before the beginning of the
@tranform block. Rather, I would like to perform a set of small sequential changes on the variable.
Am I going about this process the wrong way? Or is there a PR in the
0.7 build that might fix this (I am using
0.6.2)? Obviously, i could imagine that this isn’t trivial due to the metaprogramming involved.