Skip to content
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

return pandas df an keep functionality of dict #144

Open
jhnwllr opened this issue Apr 24, 2024 · 3 comments
Open

return pandas df an keep functionality of dict #144

jhnwllr opened this issue Apr 24, 2024 · 3 comments

Comments

@jhnwllr
Copy link
Contributor

jhnwllr commented Apr 24, 2024

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.

@CecSve
Copy link
Contributor

CecSve commented Apr 24, 2024

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
Copy link

abubelinha commented May 1, 2024

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

@CecSve CecSve changed the title return pandas df rather than dict return pandas df an keep functionality of dict May 2, 2024
@ManonGros
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants