I try to process SUM operation on COUNT column, and group by SID column. Following is my code:
type CSVRecord struct {
Sid string
Count int
}
var raw []CSVRecord
//
// do something to load CSV into raw variable ...
//
df := dataframe.LoadStructs(raw)
fmt.Println(raw)
The new dataframe.GroupBy function will trim the prefix '0' characters in a number string, for example, '0050'.
This is my sample data:
I try to process SUM operation on COUNT column, and group by SID column. Following is my code:
It is cool...
than I try to run SUM operation, and group the result by SID...
I expect the result as below:
But I got a result like this:
As you can see, the prefix '0' in string '0050' has been trimmed.