Save / Load with multiple data inputs / outputs

未关闭
#192 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
julia
领域
data, tooling

调研方向

根据提议的双表 PCL 示例和 id_row="sampleID" 选项,审查 FileIO 的 load/save 接口。确定多输入/输出分发以及这种元数据/特征拆分是否适合该框架,然后记录一项具体的 API 决策及其预期行为。

由索引模型根据 Issue 内容生成。

描述

I'm frequently dealing with a really weird tabular data structure called a PCL file - basically, the first n rows contain various forms of metadata (first column for these rows is metadata name), then below that it has a sample x feature matrix. So for example, I might have my_data.pcl:

age 12 14 18
gender m f f
sampleID a b c
feature1 0.2 0.4 0.3
feature2 0.3 0.2 0.3
feature3 0.1 0.6 0.7

Since most of the operations occur on the numerical table part, and storing this all in a single dataframe (or whatever) would generally lead to columns with type Any, what I'd like to be able to do is have load/save functions that make/take two iterable tables, that share the sampleID row, eg the two tables would be:

metadatadf:

sampleID a b c
age 12 14 18
gender m f f

featuredf:

sampleID a b c
feature1 0.2 0.4 0.3
feature2 0.3 0.2 0.3
feature3 0.1 0.6 0.7

And I'd like to be able to do something like:

(x, y) = load("my_data.pcl", id_row="sampleID")
metadatadf = DataFrame(x)
featuredf = DataFrame(y)

save("new_table.pcl", metadatadf, featuredf)

Can I get some guidance on whether this is possible / makes sense to use the FileIO framework for this?

主要语言
Julia
星标
228
派生
83
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaIO/FileIO.jl 的其他 Issue

查看 JuliaIO/FileIO.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。