Код: Выделить всё
import pandas as pd
a = [2.5,3.3]
b = [3.6,3.9]
D = {'A': a, 'B': b}
Код: Выделить всё
+---+-----+-----+
| | A | B |
+---+-----+-----+
| 0 | 2.5 | 3.3 |
| 1 | 3.6 | 3.9 |
+---+-----+-----+
Код: Выделить всё
data = np.rec.array([
('A', 2.5),
('A', 3.6),
('B', 3.3),
('B', 3.9),
], dtype = [('Type','|U5'),('Value', '
Подробнее здесь: [url]https://stackoverflow.com/questions/46837472/converting-pandas-dataframe-to-structured-arrays[/url]