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

Fix issue #19: Handle similarly named column headers in merger #22

Closed

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Aug 10, 2023

Description

This PR addresses issue #19 by modifying the combine function in internal/merger.go to handle similarly named column headers. It introduces a map to store unique headers and their corresponding column indices, and modifies the loop that writes the rows to the output file to merge the data from similarly named columns. It also handles the case where a file does not have a column for a certain header by writing an empty string for that column in the output file.

Summary of Changes

  • Modified the combine function in internal/merger.go to handle similarly named column headers.
  • Created a map to store unique headers and their corresponding column indices.
  • Modified the loop that writes the rows to the output file to merge the data from similarly named columns.
  • Handled the case where a file does not have a column for a certain header by writing an empty string for that column in the output file.

Fixes #19.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/fix-issue-19-handle-similarly-named-columns

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 10, 2023
@sweep-ai sweep-ai bot closed this Aug 10, 2023
@sweep-ai sweep-ai bot deleted the sweep/fix-issue-19-handle-similarly-named-columns branch August 10, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: make all similarly named column headers merge to the same column
0 participants