-
Notifications
You must be signed in to change notification settings - Fork 31
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
CSV without header #88
Comments
Not currently, the header is required for certain validators to function properly, e.g. to determine row lengths for the |
This is a proof of concept to support validating CSVs that don't include a header row. The implementation allows a user to define a sequence of field names and passes these through to the underlying DictReader instances. The default behavior remains unchanged. I did a quick manual test with a slight modification of the example Vlad object and sample CSV contents from the readme. If this is a useful construct, I'll be happy to fill in the documentation and tests for this option. Resolves di#88.
Add support for validating CSVs that don't include a header row. The implementation allows a user to define a sequence of field names and passes these through to the underlying `DictReader` instances. The `fieldnames` attribute is `None` by default, which retains the existing behavior of inferring field names from a header row in the source CSV. Resolves di#88.
Add support for validating CSVs that don't include a header row. The implementation allows a user to define a sequence of field names and passes these through to the underlying `DictReader` instances. The `fieldnames` attribute is `None` by default, which retains the existing behavior of inferring field names from a header row in the source CSV. Resolves di#88.
@jonafato hi, looks promising! |
Yes, if you use this feature, your CSV files should not include header rows. (This feature is not compatible with CSV files that include header rows, and setting
This is not enabled by default, but |
Is it possible to validate files without header?
I expected something like this but it seems it's not possible.
The text was updated successfully, but these errors were encountered: