跳到主要内容

DataGo

高性能 Go 数据分析库 | DataFrame, GroupBy, Merge, 并行处理

DataFrame、Series、分组聚合、数据合并、并行处理 - Go 语言原生实现

为 Go 打造的全能数据分析工具

高性能、类 pandas API、充分利用 Go 并发优势

DataFrame 与 Series

熟悉的 pandas 风格 API,支持 DataFrame 和 Series。轻松实现筛选、排序、选择和转换。

了解更多

GroupBy 分组聚合

强大的分组聚合功能。支持 Sum、Mean、Count 等内置聚合及自定义聚合。

了解更多

数据合并 Merge/Join

SQL 风格的表关联操作。支持 Inner、Left、Right、Outer Join 及多键合并。

了解更多

并行处理

充分利用 Go 并发优势处理大数据。支持并行 Apply、Filter 和聚合操作。

了解更多

Excel 与 CSV 读写

高性能文件读写。Excel 读取速度是 pandas 的 2 倍。

了解更多

类型安全

Go 静态类型提供编译时检查。支持多种数据类型及自动推断。

了解更多

性能表现

Excel 读取速度是 pandas 的 2 倍

数据集DataGopandaspolars
15K rows × 11 cols0.21s0.51s0.10s
271K rows × 16 cols5.76s11.01s2.18s

简洁而强大

熟悉的 pandas 风格 API,Go 原生性能

// Create DataFrame
df, _ := dataframe.New(map[string][]interface{}{
    "product": {"A", "B", "A", "B"},
    "sales":   {100.0, 150.0, 200.0, 120.0},
})

// GroupBy aggregation
gb, _ := df.GroupBy("product")
stats := gb.Sum("sales")

// Merge DataFrames
result, _ := dataframe.Merge(left, right, MergeOptions{
    How: InnerJoin,
    On:  []string{"id"},
})

// Parallel processing
result := df.ParallelFilter(func(row Row) bool {
    return row.Get("sales").(float64) > 100
})