Allow column-level coerce
setting to override class-level coerce
.
#1491
Labels
enhancement
New feature or request
coerce
setting to override class-level coerce
.
#1491
Is your feature request related to a problem? Please describe.
I have a schema where I want to coerce every column but one, because that one has a
dict
type, for which coercion is not supported. Currently, I need to addcoerce=True
to every field but that one, which is verbose and less clear than the alternative.Describe the solution you'd like
The solution I'd prefer is to have
coerce=True
in theConfig
class, but then allow the one column-levelcoerce=False
to override the default setting.Describe alternatives you've considered
The alternative I've considered is the less concise workaround. That works for me, so this is not a blocker. Just a convenience request.
Additional context
Here's a script demonstrating the working solution (
VerboseModel
) and the failing solution I wish would work (ConciseModel
).I think this would be a breaking change so I understand if we don't want to go this route, but putting it out there just in case.
The text was updated successfully, but these errors were encountered: