i need advice. In my DB, i have x points and y points in form:
df = pd.read_sql_table('table', cnx)
| id | curves |
|---|---|
| 1 | [(x,y),(x,y),(x,y) etc.] |
| 2 | [(x,y),(x,y),(x,y) etc.] |
type(df['curves']) #pandas.core.series.Series
And I would like to try to plot Line Graph.
I try several solutions. but nothing worked for me.
data = df['curves']
plt.plot(*zip(*data))
plt.show()
or
data_in_array = np.array(data)
transposed = data_in_array.T
x,y = transposed #but here i got error - not enough values to unpack (expected 2, got 1)
Please advice
