Skip to content
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

How to add empty string as value so that all rows have the same number of fields #1053

Open
sp88011 opened this issue May 16, 2024 · 0 comments

Comments

@sp88011
Copy link

sp88011 commented May 16, 2024

I'm trying to solve the error ``Too few fields: expected [10] fields but parsed [8]`.

Ultimately, the csv I'm looking at has indeed too few fields for certain rows. That is because usually when saving a csv, trailing empty values in are omitted in a given row.

Is there any way to add empty strings ("") to any trailing empty field to ensure each row has the same number of fields? We know how many fields are expected by passing a header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant