You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is intended. Other than this is the behavior in patito: would you have expected dataframely to keep the columns as well? If so, what would be your use case?
So using the return value of validate removes the columns, but we were only using it to see if there were errors, so we just wanted to receive an error if there are extra columns
It feels like there should at least be option to raise when calling .validate on a dataframe with columns not present in the dataframely schema.
One use of dataframely could be to monitor for schema drift of external sources. Say an external source adds another column, you might want to be notified that such a change has occurred. Dataframely could be the perfect tool for that.
Also out of curiosity, what is the reason for not raising when extra columns exist? It feels to me at least that this choice goes against the polars philosophy of "Adhering to a strict schema". For example polars will not allow you to concatenate two dataframes with different columns unless you explicitly set how="diagonal". It is possible that two dataframes - which have both been validated by the same schema - cause an exception in a call to pl.concat() (unless how="diagonal")
Super big fan of dataframely btw, You guys are doing some awesome work. :3
Activity
borchero commentedon Jan 16, 2026
This is intended. Other than this is the behavior in patito: would you have expected dataframely to keep the columns as well? If so, what would be your use case?
ion-elgreco commentedon Jan 17, 2026
So using the return value of validate removes the columns, but we were only using it to see if there were errors, so we just wanted to receive an error if there are extra columns
Makiv1 commentedon Jan 27, 2026
It feels like there should at least be option to raise when calling
.validateon a dataframe with columns not present in the dataframely schema.One use of dataframely could be to monitor for schema drift of external sources. Say an external source adds another column, you might want to be notified that such a change has occurred. Dataframely could be the perfect tool for that.
Also out of curiosity, what is the reason for not raising when extra columns exist? It feels to me at least that this choice goes against the polars philosophy of "Adhering to a strict schema". For example polars will not allow you to concatenate two dataframes with different columns unless you explicitly set
how="diagonal". It is possible that two dataframes - which have both been validated by the same schema - cause an exception in a call topl.concat()(unlesshow="diagonal")Super big fan of dataframely btw, You guys are doing some awesome work. :3
datenzauberai commentedon Sep 10, 2026
I also think it would be useful to have that option, something like