How can I clear the contents of a specific column in a specific data table?I have an existing data table and I've updated rows in it, but now I want to have a function that just clears all the rows or sets them all to empty(); also would like it to be really fast because it's a very large table. I tried this but it's quite slow.
Column( my_table, "MY_COL" ) << formula (empty());
Column( my_table, "MY_COL" ) << Delete Formula;
Advanced Statistical ModelingData Blending and CleanupMass CustomizationQuality and Process EngineeringRe: How can I clear the contents of a specific column in a specific data table?Hi,
This should be faster; is it fast enough for your needs?
my_table[0, loc(my_table << get column names(string), "MY_COL")] = .;
For example:
Names Default To Here(1);
my_table = astable(J(1e5, 2, Random Uniform()));
my_table[0, loc(my_table << get column names(string), "Col1")] = .;
Re: How can I clear the contents of a specific column in a specific data table?Thanks! This is much faster.