Nullable column missing fails validate(..., cast=True)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 618
- Forks
- 21
- Avg merge
- 14h 34m
- Merged PRs (30d)
- 7
Description
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'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the validate(..., cast=True) behavior shown in the issue and trace how missing schema columns are handled. Check the existing documentation and issue discussion for the intended nullable-column semantics; done should be demonstrated by the example validating successfully with column_b present and filled with nulls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100