flatten columns of discrete value