Skip to content

fix: replace deprecated DataFrame.append with pd.concat in mTMS handler#1276

Open
prometheus5863 wants to merge 1 commit intoinvesalius:masterfrom
prometheus5863:fix/mtms-dataframe-append-pandas2
Open

fix: replace deprecated DataFrame.append with pd.concat in mTMS handler#1276
prometheus5863 wants to merge 1 commit intoinvesalius:masterfrom
prometheus5863:fix/mtms-dataframe-append-pandas2

Conversation

@prometheus5863
Copy link
Copy Markdown

Closes #1275

invesalius/navigation/mtms.py uses pd.DataFrame.append() which was
removed in pandas 2.0 (April 2023). Any user running a modern Python
environment hits AttributeError: 'DataFrame' object has no attribute 'append'
when using the mTMS stimulation logging feature.

This patch replaces the single DataFrame.append() call with pd.concat().
No other DataFrame .append() calls exist in this file.

DataFrame.append() was removed in pandas 2.0 (April 2023). Replace with pd.concat() to restore compatibility with modern environments.
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.

AttributeError: DataFrame has no attribute 'append' in mTMS handler on pandas ≥ 2.0

1 participant