I have the following pandas dataframe
pandas
import pandas as pd a = [2.5,3.3] b = [3.6,3.9] D = {\'A\': a, \'B\': b}
which gives me
np.rec.fromrecords(list(zip(df.melt().variable,df.melt().value))) Out[531]: rec.array([('A', 2.5), ('A', 3.3), ('B', 3.6), ('B', 3.9)], dtype=[('f0', '