Nullable column missing fails validate(..., cast=True)
还没有人认领这个 Issue。
评估
调研方向
从 issue 中展示的 validate(..., cast=True) 行为开始,跟踪缺失的 schema 列是如何处理的。检查现有文档和 issue 讨论,以了解预期的 nullable 列语义;应通过在存在 column_b 且其填充为 nulls 的情况下成功验证该示例来证明已完成。
由索引模型根据 Issue 内容生成。
描述
If a column is nullable, why do we not allow dataframely to create the column if it doesn't exist yet (filled with nulls) when casting? I realise you've probably thought about this but I couldn't find an explicit mention of this in the docs or GitHub issues.
import dataframely as dy
import polars as pl
class TableSchema(dy.Schema):
column_a = dy.String(nullable=False)
column_b = dy.String(nullable=True)
df = pl.DataFrame({"column_a": 0})
TableSchema.validate(df, cast=True)
# Raises SchemaError
# SchemaError: 1 missing columns for schema 'TableSchema': 'column_b'
- 主要语言
- Python
- 星标
- 618
- 派生
- 21
- 平均合并
- 14 小时 34 分钟
- 30 天内合并 PR
- 7
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Quantco/dataframely 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Quantco/dataframely#402 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 62/100
Quantco/dataframely#357 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
Quantco/dataframely#309 · 4 条评论 · 2 个 reaction ·
-
难度 5/5 一周以上 新手友好度 45/100
Quantco/dataframely#295 · 3 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 45/100
Quantco/dataframely#273 · 5 条评论 · 1 个 reaction ·
查看 Quantco/dataframely 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100