build a numpy array from the dataframe