Add --separator argument to from_csv#943
Merged
sophiajt merged 2 commits intonushell:masterfrom Nov 9, 2019
drmason13:from_csv-add-separator-arg
Merged
Add --separator argument to from_csv#943sophiajt merged 2 commits intonushell:masterfrom drmason13:from_csv-add-separator-arg
sophiajt merged 2 commits intonushell:masterfrom
drmason13:from_csv-add-separator-arg
Conversation
The command takes a string, checks it is a single character and then passes it to csv::ReaderBuilder via .delimiter() method as a u8.
Contributor
|
Looks good! Thanks for the PR |
Contributor
|
@drmason13 - think about this a bit more, are you interested in making a similar change to |
Contributor
Author
|
Yeah, I'd like to do that. Seems pretty obvious it should work both ways :) |
Contributor
Author
|
Blimey I hardly recognise from_csv :P stuff has been pulled out to Would anyone be able to explain how it works now? It looks like it's only able to parse CSV now, the "CSV" string passed by from_csv isn't used as far as I can tell. I could add a ValidStructuredDataFormats enum (I'm bad at naming things!) which could then lead to using a different library to parse other data types. It's getting interesting :) I'd love to help have a crack at figuring a clean way of doing this. |
elferherrera
added a commit
to elferherrera/nushell
that referenced
this pull request
Feb 7, 2022
kubouch
pushed a commit
that referenced
this pull request
Feb 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The command takes an optional named parameter as a string, checks it is a single character and then
passes it to csv::ReaderBuilder via .delimiter() method as a u8.
Mostly implements #932 , only lacking the auto-detection of csv delimiter.
Should allow building a table from semi-colon separated csv files.: