Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Future warning on pandas frame.append #149

Open
cbworden opened this issue Apr 29, 2022 · 1 comment
Open

Future warning on pandas frame.append #149

cbworden opened this issue Apr 29, 2022 · 1 comment
Labels

Comments

@cbworden
Copy link
Member

Describe the bug
/Users/cbworden/miniconda/envs/shakemap/lib/python3.8/site-packages/impactutils/mapping/city.py:329: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
newdf = newdf.append(tdf)

@cbworden cbworden added the bug label Apr 29, 2022
@gferragu
Copy link

gferragu commented Jun 7, 2022

Just commenting to note this was discussed yesterday in the groundmotion processing meeting. No functionality issues there, just lots of warning output during map generation. It can be fixed by switching from append to concat here. The append command has been deprecated because it is a special case of concat, which can specify the axis to concatenate along. The fix would be something like newdf = newdf.concat(tdf, axis=0, join='outer'), but these are the default values in concat anyway. I know @emthompson-usgs is refactoring the code, so this could be fixed in that or as a separate quick PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants