Skip to content

Rename _GMT_DATASET.to_dataframe to .to_pandas and _GMT_GRID.to_dataarray/_GMT_IMAGE.to_dataarray to .to_xarray #3651

Closed

Description

@seisman

Here I propose renaming the following methods to align with conventions adopted by xarray/pandas/pyarrow:

  • Rename _GMT_DATASET.to_dataframe to .to_pandas.
  • Rename _GMT_GRID.to_dataarray and _GMT_IMAGE.to_dataarray to .to_xarray

Reference:

Since _GMT_DATASET/_GMT_GRID/_GMT_IMAGE are internal data structures, we can rename these functions without deprecation warnings. Of course, we can also go with the deprecation cycle if you think it's necessary.

Activity

  1. added
    discussions
    on Nov 26, 2024
  2. seisman commented on Feb 8, 2025

    @seisman
    MemberAuthor

    Ping @GenericMappingTools/pygmt-maintainers for comments on this.

  3. weiji14 commented on Feb 10, 2025

    @weiji14
    Member

    Ok with renaming, though I feel it is low priority. Also agree that this doesn't need to go through a deprecation warning since these methods are under a private class.

  4. added this to the 0.15.0 milestone on Feb 10, 2025
  5. added
    maintenance
    and removed
    discussions
    on Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenance

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions