Could some one help me out with an efficient solution to convert a tabular data into a numpy matrix? The input is tabular data with header in the following format: D1 D2 ValueA B 1C D 2E F 3A D 1E B 4 The desired output is a numeric numpy array: 1 2 2 4 3 Here, D1 column values of table "transforms" to rows in the array (representing A/C/E in order) and D2 column values of table "transforms" to column in the array (representing B/D/F in order) and the values are arranged appropriately. Continue reading...