Skip to content

clib: Change the parameter order and set output_type to pandas in virtualfile_to_dataset #3124

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

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 19, 2024

Description of proposed changes

For some module wrappers like which, output_type makes no sense because the a "file" or "numpy" output is useless. When refactoring these module wrappers, we have to use

lib.virtualfile_to_dataset(output_type="pandas", vfname=vouttbl)

which doesn't look good.

This PR move the vfname parameter before the output_type parameter and set output_type's default to "pandas", so that we can use a much shorter version

lib.virtualfile_to_dataset(vfname=vouttbl)

Putting vfname as the first parameter makes more sense because vfname is always a required parameter.

Patches #3083.

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog final review call This PR requires final review and approval from a second reviewer labels Mar 19, 2024
@seisman seisman added this to the 0.12.0 milestone Mar 19, 2024
@weiji14 weiji14 changed the title clib: Change the parameter order and set output_type to pands in virtualfile_to_dataset clib: Change the parameter order and set output_type to pandas in virtualfile_to_dataset Mar 19, 2024
Comment on lines 1763 to 1764
column_names
The column names for the :class:`pandas.DataFrame` output.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the proof of concept at #3117 works, these lines will need to be updated (after we add some logic to use the header column names in this virtualfile_to_dataset method)

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-approving, since the suggestions are just stylistic changes.

@seisman seisman enabled auto-merge (squash) March 20, 2024 00:57
@seisman seisman disabled auto-merge March 20, 2024 01:17
@seisman seisman merged commit 7fd8253 into main Mar 20, 2024
@seisman seisman deleted the fix/virtualfile_to_dataset branch March 20, 2024 01:18
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants