这是 Greg Wilson 所著《SQL for Data Scientists in 100 Queries》的翻版,其中每个 SQL 查询示例都使用数据帧语法/API 重新编写。
什么是 dataframe,何时使用?
dataframe 是一种表格数据的编程式内存表示法。它是 Kotlin 与 Python 的 pandas 或 R 的 dplyr 的平行产品。
另一种理解方式就是 Excel,但使用的是编程语言而不是单个单元格公式。它是一个易于使用的界面,可以像 Excel 一样操作结构化数据,包括排序、筛选、更新、计算等。
虽然 dataframe 有自己特定的 API,但几乎所有 Kotlin 函数都可以纳入数据处理例程。大多数数据帧项目都是从关系数据库、CSV 文件、JSON 数据结构或 Excel 表单中读取数据开始的。
- dataframe documentation: https://kotlin.github.io/dataframe/overview.html
- github repository: https://github.com/Kotlin/dataframe
- other great tutorials in https://github.com/Kotlin/dataframe/tree/master/examples/notebooks
详细点击标题