Giter VIP home page Giter VIP logo

Comments (3)

pjebs avatar pjebs commented on May 14, 2024

Can you give me a code sample of what you were trying to achieve?

from dataframe-go.

vikram-rawat avatar vikram-rawat commented on May 14, 2024

I am currently trying to learn it so that I can recommend it to be used in an upcoming project. But the examples mentioned on the site are not working... this is what I wrote..

package main

import (
	"fmt"
	"context"
	"github.com/rocketlaunchr/dataframe-go"
)

func main() {

	s1 := dataframe.NewSeriesInt64("day", nil, 1, 2, 3, 4, 5, 6, 7, 8)
	s2 := dataframe.NewSeriesFloat64("sales", nil, 50.3, 23.4, 56.2, nil, nil, 84.2, 72, 89)
	df := dataframe.NewDataFrame(s1, s2)

	df.Append(nil, 9, 123.16)
	df.Append(nil, map[string]interface{}{
		"day":   10,
		"sales": nil,
	})
	
	df.Remove(0)

	df.UpdateRow(0, nil, map[string]interface{}{
		"day":   3,
		"sales": 45,
	})

	sks := []dataframe.SortKey{
			{Key: "sales", Desc: true},
			{Key: "day", Desc: true},
		}

	df.Sort(ctx, sks)

	fmt.Print(df.Table())
}

from dataframe-go.

pjebs avatar pjebs commented on May 14, 2024

add ctx := context.Background() at the top

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.