Skip to content

return pandas df an keep functionality of dict #144

Open
@jhnwllr

Description

I have noticed a lot of pygbif functions return sometimes rather nested dicts rather than something more flat like a pandas df.

I have always thought that one of the advantages of rgbif was that is sort of normalizes the json ouput for you.

I think would could start to provide some methods for normalizes nested output from pygbif.

Activity

CecSve

CecSve commented on Apr 24, 2024

@CecSve
Contributor

That would be great. Maybe allow for users to still get the dicts output also - I imagine some Python users are used to that.

abubelinha

abubelinha commented on May 1, 2024

@abubelinha

Maybe allow for users to still get the dicts output also

Of course. That should be the default.
Otherwise all current pygbif-based applications would stop working

changed the title return pandas df rather than dict return pandas df an keep functionality of dict on May 2, 2024
ManonGros

ManonGros commented on May 6, 2024

@ManonGros
Contributor

I personally prefer dictionaries if I am working with nested objects like json outputs. Plus it is so easy to transform them into your favourite data frame object. Choosing pandas is a bit arbitrary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      return pandas df an keep functionality of dict · Issue #144 · gbif/pygbif