rocketlaunchr / dataframe-go

DataFrames for Go: For statistics, machine-learning, and data manipulation/exploration
Other
1.16k stars 93 forks source link

Error to import csv, raised parquet-go error #66

Closed sdfwds4 closed 2 years ago

sdfwds4 commented 2 years ago

Hi, I got an error to import csv, need help! code from README.md

package main

import (
    "context"
    "fmt"
    "strings"

    "github.com/rocketlaunchr/dataframe-go/imports"
)

var ()

func main() {
    csvStr := `
Country,Date,Age,Amount,Id
"United States",2012-02-01,50,112.1,01234
"United States",2012-02-01,32,321.31,54320
"United Kingdom",2012-02-01,17,18.2,12345
"United States",2012-02-01,32,321.31,54320
"United Kingdom",2012-05-07,NA,18.2,12345
"United States",2012-02-01,32,321.31,54320
"United States",2012-02-01,32,321.31,54320
Spain,2012-02-01,66,555.42,00241
`
    fmt.Println(csvStr)

    ctx := context.Background()

    df, err := imports.LoadFromCSV(ctx, strings.NewReader(csvStr))
    fmt.Println(df)
    fmt.Println(err)
}

There is error to run

$ go run main.go
# github.com/xitongsys/parquet-go/parquet
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:631:16: not enough arguments in call to iprot.ReadStructBegin
        have ()
        want (context.Context)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:637:37: not enough arguments in call to iprot.ReadFieldBegin
        have ()
        want (context.Context)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:649:30: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:659:30: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:669:30: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:679:30: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:689:30: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:699:30: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:704:28: not enough arguments in call to iprot.Skip
        have (thrift.TType)
        want (context.Context, thrift.TType)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:708:15: not enough arguments in call to iprot.ReadFieldEnd
        have ()
        want (context.Context)
C:\Users\hellogo\go\pkg\mod\github.com\xitongsys\parquet-go@v1.5.2\parquet\parquet.go:708:15: too many errors
pjebs commented 2 years ago

Your code had nothing to do with parquet. Why is parquet package generating errors?

sdfwds4 commented 2 years ago

Your code had nothing to do with parquet. Why is parquet package generating errors?

Idon't know, I want to find it out too. It seem be a Go building error.

pjebs commented 2 years ago

Can you send me your full project so I can investigate

sdfwds4 commented 2 years ago

I copy my code to other PC, it work, and has no error, so it maybe my problem.