Session.virtualfile_to_dataset: Add new parameters 'dtype'/'index_col' for pandas output#3140
Merged
Session.virtualfile_to_dataset: Add new parameters 'dtype'/'index_col' for pandas output#3140
Conversation
seisman
commented
Mar 26, 2024
| @@ -1747,6 +1747,8 @@ def virtualfile_to_dataset( | |||
| vfname: str, | |||
| output_type: Literal["pandas", "numpy", "file"] = "pandas", | |||
| column_names: list[str] | None = None, | |||
Member
Author
There was a problem hiding this comment.
In Session.virtualfile_to_dataset, do we want to rename column_names to names?
Member
There was a problem hiding this comment.
I kinda prefer column_names, we don't necessarily need to follow pd.read_csv here.
Member
Author
There was a problem hiding this comment.
Do you mean using column_names in both GMT_DATASET.to_dataframe and Session.virtualfile_to_dataset?
9f67844 to
4554e63
Compare
f211b7d to
a3d7768
Compare
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
…s' to 'names'" This reverts commit a3d7768.
f11dc89 to
abda146
Compare
weiji14
approved these changes
Mar 27, 2024
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.
Address #3131 (comment).
Changes in this PR:
GMT_DATASET.to_dataframe: Add new parametersnames/dtype/index_colSession.virtualfile_to_dataset: AAdd new parameterdtype/index_coland renamecolumn_namestonamesThe parameter names
names/dtype/index_colare very close to the ones in thepd.read_csvfunction.