ioos / erddapy

Python interface for ERDDAP
https://ioos.github.io/erddapy/
BSD 3-Clause "New" or "Revised" License
77 stars 30 forks source link

Remove Pandas FutureWarning #229

Closed vinisalazar closed 2 years ago

vinisalazar commented 2 years ago

Hi,

Problem

When running ERDDAP.griddap_initialize, I would get the following warning: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. My Pandas version is 1.4.0.

Proposed solution

If merged, this PR will modify the _griddap_get_constraints function in order to remove the Pandas FutureWarning that was introduced in the latest Pandas versions.

I ran Pytest, Pre-Commit, and tested the function locally (by running ERDDAP.griddap_initialize), and things seem to be working properly.

Summary of changes:

Thank you for any assistance you can provide,

Vini

vinisalazar commented 2 years ago

Update: just did some more checks and this introduces some bugs. Will investigate further and push to this PR.

vinisalazar commented 2 years ago

Fixed with f94c9b8. Had forgotten to overwrite the new table variable.

ocefpaf commented 2 years ago

@vinisalazar is this one ready for review?

vinisalazar commented 2 years ago

Yes, thank you for the reminder!

vinisalazar commented 2 years ago

@ocefapf apologies for missing your comment about the nesting. Thank you for the review and merge!

ocefpaf commented 2 years ago

No problem. I'm doing some housekeeping to get ready for GSoC and went ahead with this one. Hope to see more PRs from you in the future ;-p