ENH: add some more common Nodes
还没有人认领这个 Issue。
评估
调研方向
The issue provides a proposed DFNode class but names no repository files, tests, or entry point. Start by reviewing the existing Node abstractions and pandas read_* and to_* conventions; the work would be complete when the project has an agreed, tested way to read and write common dataframe formats with load and save options.
由索引模型根据 Issue 内容生成。
描述
Writing pandas dataframes to disk seems really common. I am going to have to write my own DFNode class for this. Would you like me to generalize it enough and then contribute it here?
I would imagine something like
class DFNode:
def __init__(self, path: str | ..., kind: Literal["csv", "parquet", ...], load_kwargs: dict[str, Any = {}, save_kwargs: dict[str, Any]):
self.path = path
self.kind = kind
self.load_kwargs = load_kwargs
self.save_kwargs = save_kwargs
def save(self, value: Any) -> None:
saver = getattr(value, f"to_{self.kind}")
saver(self.path, **self.save_kwargs)
def load(self, is_product: bool) -> Any:
if is_product:
return self
loader = getattr(pd, f"read_{self.kind}")
return loader(self.path, **self.load_kwargs)
- 主要语言
- Python
- 星标
- 146
- 派生
- 14
- 平均合并
- 3 天 16 小时
- 30 天内合并 PR
- 34
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pytask-dev/pytask 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 45/100
pytask-dev/pytask#985 ·
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
pytask-dev/pytask#786 · 2 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 42/100
pytask-dev/pytask#513 · 8 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
pytask-dev/pytask#403 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
pytask-dev/pytask#320 · 1 条评论 ·
查看 pytask-dev/pytask 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·