1 Star 0 Fork 11

谋决量化 / go_pandas

forked from 王布衣 / pandas 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dataframe_remove_test.go 500 Bytes
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2023-02-14 01:00 . !58 #I6EVCO 实现NDArray
package pandas
import (
"fmt"
"gitee.com/quant1x/pandas/stat"
"testing"
)
func TestDataFrame_Remove(t *testing.T) {
type testStruct struct {
A string
B int
C bool
D float64
}
data := []testStruct{
{"a", 1, true, 0.0},
{"b", 2, false, 0.5},
}
df1 := LoadStructs(data)
fmt.Println(df1)
// 增加1列
s_e := GenericSeries[string]("x", "a0", "a1", "a2", "a3", "a4")
df2 := df1.Join(s_e)
fmt.Println(df2)
r := stat.RangeFinite(3, 3)
df3 := df2.Remove(r)
fmt.Println(df3)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/moujue/go_pandas.git
git@gitee.com:moujue/go_pandas.git
moujue
go_pandas
go_pandas
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891