-
Notifications
You must be signed in to change notification settings - Fork 219
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
clib: Add virtualfile_to_dataset method for converting virtualfile to a dataset #3083
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6827c82
clib: Add the return_table method for output table data
seisman bd166fe
Add the function to doc
seisman d376a74
Add doctest
seisman 193bd05
Improve docstrings
seisman c9e482a
fix
seisman ce029b2
Rename return_table to return_dataset
seisman 9640c26
Update doc index page
seisman 9f9f08d
Merge branch 'main' into clib/return_table
seisman 796f1cc
Update pygmt/clib/session.py
seisman 711142c
Rename return_dataset to virtualfile_to_dataset
seisman aee0499
Improve the description about public methods
seisman cd5b31d
Change parameter name vfile to vfname
seisman bc7d844
Update doc/api/index.rst
seisman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set a default output type here? It looks like we're using
pandas
as the default in #3092.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes no differences because we always call the function with the
output_type
parameter, e.g.,:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it doesn't make any difference in the PyGMT modules, but this is a good central location to document that
output_type="pandas"
is the default output (though in #1318, it seemed like most of us were in favour ofoutput_type="input"
or auto as the default).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output_type="input"
orauto
may not make sense for PyGMT, especially in cases like:auto
means outputting to a file by default, thenoutfile
is required.x
/y
/z
) and each vector can be a list/ndarray/pd.Series. Then what's the expected format ifauto
/input
is used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not saying that
output_type="auto"
would be easy to implement 🙂 I think the defaultoutput_type="pandas"
is fine for now since it is an in-memory format that can be converted to virtualfiles relatively easily. We can discuss more about what the ideal output type would be in #1318 (if there is still any debate that needs to be had).