-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandasschema #467
pandasschema #467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the leading-/trailing- white space validations. Why would we bother users with something so trivial?
P.S. the (previous) double asserts were separate for column names and column content. That was indeed a bit clunky.
column_schema["sample"] = [LeadingWhitespaceValidation(), | ||
TrailingWhitespaceValidation(), | ||
IsDistinctValidation(), | ||
MatchesPatternValidation(allowed_pattern)] | ||
|
||
column_schema["descriptive_name"] = [LeadingWhitespaceValidation(), | ||
TrailingWhitespaceValidation(), | ||
IsDistinctValidation(), | ||
MatchesPatternValidation(allowed_pattern)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all columns are checked in the for loop after this, so maybe make a for loop for these two columns to check the IsDistinceValidation()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep makes sense!
Waiting for this to be accepted: multimeric/PandasSchema#37 |
[Column(col, [MatchesPatternValidation(allowed_pattern), | ||
IsDistinctValidation(ignore_nan=True)] if col in distinct_columns else [MatchesPatternValidation(allowed_pattern)], allow_empty=True) for col in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore_nan
doesnt exist now right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! The cat 🐱 didnt let me sleep last night
What problem is the PR solving / What's new?
Added pandasschema for column parsing and slightly prettier/clearer/user-friendliness log for bad public samples (in the sense they all get logged).
@siebrenf I think the same check was done twice or do I not understand?
Checklist