I have a data set of 100 rows and 10 columns. I have imported it as Tabular. Then, I want to apply log followed by z-score to all columns except one, which represents the class label.
What is the easiest way to do so?
A general approach would be to use TransformColumns together with ColumnwiseThread and Standardize.
tab = Tabular[{{2., 2.78, "A"}, {1., 3.14, "B"}, {3., 1.68, "C"}}, 
               {"x", "y", "class"}]
TransformColumns[tab, "x" -> Function[ColumnwiseThread[Standardize[Log[#x]]]]]
However, currently, it seems you would have to do this "manually" for every column. I see two possible ways to make this apply to all columns (except the "class" one):
(* Method 1 *)
ToTabular[KeyValueMap[Function[#1 -> If[#1 != "class", Standardize[Log[#2]], #2]],
   FromTabular[tab, "Columns"]], "Columns"]
(* Method 2 *)
ToTabular[KeyValueMap[
  Function[{col, vals}, col -> If[col != "class", Standardize[Log[vals]], vals]], 
  FromTabular[tab, "Columns"]], "Columns"]
TransformColumns[tab,   Map[(c |-> c -> Function[ColumnwiseThread[Standardize[Log[Slot[c]]]]])]@   Select[FreeQ["class"]]@ColumnKeys[tab]]
                $\endgroup$