Giter VIP home page Giter VIP logo

Comments (9)

pjebs avatar pjebs commented on May 14, 2024
  1. Series string should have a function called ToFloat
  2. You can add more series to []chart.Series{cs}
  3. For plotting, everything is outsourced to the wcharczuk package, so you'll need to read it's docs

from dataframe-go.

padchin avatar padchin commented on May 14, 2024
  1. Series string should have a function called ToFloat

My s (type: dataframe.Series) does not have this method

from dataframe-go.

pjebs avatar pjebs commented on May 14, 2024

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.

from dataframe-go.

pjebs avatar pjebs commented on May 14, 2024

You also don't need to save plot to file. See readme on usage.

from dataframe-go.

padchin avatar padchin commented on May 14, 2024

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.

from dataframe-go.

pjebs avatar pjebs commented on May 14, 2024

you need to type assert

from dataframe-go.

padchin avatar padchin commented on May 14, 2024

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.

from dataframe-go.

pjebs avatar pjebs commented on May 14, 2024

https://medium.com/@rocketlaunchr.cloud/type-conversions-casting-type-assertions-fb295430e387

from dataframe-go.

padchin avatar padchin commented on May 14, 2024

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.

from dataframe-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.