使用Arrow管理数据
在之前的数据挖掘:是时候更新一下TCGA的数据了推文中,保存TCGA的数据就是使用Arrow格式,因为占空间小,读写速度快,多语言支持(我主要使用的3种语言都支持)
Format
Apache Arrow defines a language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware like CPUs and GPUs. The Arrow memory format also supports zero-copy reads for lightning-fast data access without serialization overhead.
Language Supported
Arrow's libraries implement the format and provide building blocks for a range of use cases, including high performance analytics. Many popular projects use Arrow to ship columnar data efficiently or as the basis for analytic engines.
Libraries are available for C, C++, C#, Go, Java, JavaScript, Julia, MATLAB, Python, R, Ruby, and Rust.
Ecosystem
Apache Arrow is software created by and for the developer community. We are dedicated to open, kind communication and consensus decisionmaking. Our committers come from a range of organizations and backgrounds, and we welcome all to participate with us.
R
install.packages("arrow")
library(arrow)
# write iris to iris.arrow and compressed by zstd
arrow::write_ipc_file(iris,'iris.arrow', compression = "zstd",compression_level=1)
# read iris.arrow as DataFrame
iris=arrow::read_ipc_file('iris.arrow')
python
# conda install -y pandas pyarrow
import pandas as pd
# read iris.arrow as DataFrame
iris=pd.read_feather('iris.arrow')
# write iris to iris.arrow and compressed by zstd
iris.to_feather('iris.arrow',compression='zstd', compression_level=1)
Julia
using Pkg
Pkg.add(["Arrow","DataFrames"])
using Arrow, DataFrames
# read iris.arrow as DataFrame
iris = Arrow.Table("iris.arrow") |> DataFrame
# write iris to iris.arrow, using 8 threads and compressed by zstd
Arrow.write("iris.arrow",iris,compress=:zstd,ntasks=8)
相关文章
- 12-物联网开发终端管理篇-java使用Druid连接池获取MySQL数据库数据,并通过MQTT发送(Windows系统)
- 12-物联网开发终端管理篇-java使用Druid连接池获取MySQL数据库数据,并通过MQTT发送(linux,宝塔)
- 【Android 逆向】修改运行中的 Android 进程的内存数据 ( 使用 IDA 分析要修改的内存特征 | 根据内存特征搜索修改点 | 修改进程内存 )
- 为什么使用动态住宅IP代理来做数据提取业务更好?
- JavaWeb学习总结(三十五)——使用JDBC处理Oracle大数据详解编程语言
- 如何使用Hibernate对Oracle中Clob类型数据存储和取出详解编程语言
- 使用 MongoDB 导出数据的简单步骤(mongodb数据导出)
- Oracle数组的使用:让你轻松管理大量结构相同的数据(oracle数组的使用)
- 使用Java操作Redis实现数据过期管理(redisjava过期)
- 使用Oracle代替触发器,高效管理数据变更(oracle替代触发器)
- 使用mysql管理同一天内的数据(mysql同一天)
- MongoDB数据库:使用命令行管理您的数据(mongodb数据库命令)
- 使用Redis轻松管理数据(rredis)
- 使用 JS 操作 Redis:实现强大数据存储.(js调用redis)
- 使用Oracle实现数据按天分区管理解决方案(oracle按天分区)
- 利用Linux文件监听实现实时数据监控与分析(linux文件监听)
- 使用Java连接SQL Server数据库,快速高效地管理数据(java连接sqlserver数据库)
- 使用Android实现连接MySQL数据库:实现快速数据交互与管理(android连接mysql数据库)
- 使用SQLserver中间层实现数据访问可靠性(sqlserver中间层)
- MySQL 使用联合唯一索引确保数据可靠性(mysql联合唯一索引)
- 使用redis sadd命令存储数据(redissadd命令)
- 使用Oracle让列加密保护隐私数据(oracle 列 加密)
- 存储使用C语言操作MySQL数据库存储(c 使用mysql的数据)
- MySQL中使用for循环进行数据遍历(mysql中for巡海)
- 不要滥用Redis让数据保持安全性(不乱使用redis)
- 在Shell中使用Redis快速管理你的数据(shell使用redis)
- MySQL下载壁纸高级如何轻松地将数据存储和管理方式升级本文为您详细介绍了下载MySQL的方法以及如何使用它来管理和存储壁纸的过程
- 数据使用Redis集群模式更高效地删除数据(redis集群模式删除)
- 使用Redis构建一个更稳定的数据选择库(redis 选择库)
- 使用SQL查询DB29中的XML数据
- c#数据绑定之linq使用示例