I am trying to split a data table that has some bad data in it. I have exleded those bad data in the original table, but I don't know why those data are showling up in split table.
My script is bellow:
dt_daily << New Column( "Outliers Exclusion", Numeric, Continuous, Formula( If( :Mahal. Distances > 1.96, 0, 1 ) ), eval formula );
dt_daily << select where( :Outliers Exclusion == 0 ) << exclude;
Wait( 0 );
dt_dailysplit = dt_daily << Split( Split By( :EquipmentName ), Split( :Energy % from Controls ), Remaining Columns( drop all ) );
Wait( 0 );
dt_daily is the original table, you can see that I did some exculsion over there.
dt_dailysplit is the new split data table
The Split platform appears to not support the "Excluded" state. You will need to either delete the rows, or select the nonexcluded rows and then subset them to a new data table, and then split that data table.
I don't want to delete these data and am tring to subset them into a new table. Could you please give me some help on script part for select ing nonexcluded rows and then subset them to a new data table?
Thanks you so much!
Here is a simple example:
Names Default To Here( 1 ); dt = Current Data Table(); dt << select where( Excluded( Row State() ) == 0 ); dtSub = dt << subset( selected rows( 1 ), selected columns( 0 ) );
To learn about how to set and use the various RowState capabilites, see the secion on Row States in the Scripting Guide