Closed padchin closed 3 years ago
- Series string should have a function called ToFloat
My s
(type: dataframe.Series) does not have this method
https://pkg.go.dev/github.com/rocketlaunchr/dataframe-go#SeriesString.ToSeriesFloat64
or alternatively, when loading CSV data, use DictateDataType
to configure the column as float64 so you will already have a SeriesFloat64.
You also don't need to save plot to file. See readme on usage.
Ok, then. I understood conserning DictateDataType
. This is not my case as I don't know the name of columns in advance. But I cannot still understand how to extract SeriesString
form dataframe's columns which have type Series
.
you need to type assert
I would really appreciate it if you could share a small example. Because this construction is not correct:
v := df.Series[2]
v1 := dataframe.NewSeriesString("name", nil, v)
I cannot imagine what should I do now.
https://pkg.go.dev/github.com/rocketlaunchr/dataframe-go#SeriesString.ToSeriesFloat64
Thanks for your assistance. Finally I was able to figure out the type assertions. Everything works now.
Hi! At the moment I have managed to plot a separate dataframe column by this strange method:
Is there any simplier or more elegant method to do this job? And another question is if I can plot several columns on one plot? And if it is possible, how can I do this? Thanks in advance.