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

Fix pandas deprecation warning #1189

Merged
merged 1 commit into from Apr 8, 2022
Merged

Fix pandas deprecation warning #1189

merged 1 commit into from Apr 8, 2022

Conversation

keyuxing
Copy link
Contributor

@keyuxing keyuxing commented Apr 6, 2022

This is a small PR to replace DataFrame.append (deprecated in pandas v1.4.0) with pandas.concat in _query_solar_system_objects.

Without this fix, executing lc.query_solar_system_objects currently yields the following deprecation warning:

/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/lightkurve/utils.py:742: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
  df = df.append(res)

@orionlee
Copy link
Collaborator

orionlee commented Apr 8, 2022

@barentsen The change looks good to me.

I've also verified that using pandas.concat is safe in the sense that it is supported by the minimal pandas (1.1.4) needed for lightkurve.

pandas = ">=1.1.4"

https://pandas.pydata.org/pandas-docs/version/1.1/reference/api/pandas.concat.html

@barentsen
Copy link
Collaborator

Thank you @keyuxing and @orionlee! 👍 👍

@barentsen barentsen merged commit ad1ddae into lightkurve:main Apr 8, 2022
barentsen added a commit that referenced this pull request Apr 8, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants