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

Change findpeaks indexing to support pandas 3.0 #37

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

dstrain115
Copy link
Contributor

@dstrain115 dstrain115 commented Jan 2, 2025

df["foo"].iloc[bar] = xyz is using chained indexing and then setting a value,
which is setting the value of a copy (in pandas 3.0+)
Changing this to use a single index, such as:
df.iloc[bar, df.columns.get_loc("foo")] = xyz

See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy for details.

`df["foo"].iloc[bar] = xyz` is using chained indexing and then setting a value,
which is setting the value of a copy (in 3.0)
Changing this to use a single index, such as:
`df.iloc[bar, df.columns.get_loc("foo")] = xyz`
@erdogant erdogant merged commit 0dfeaac into erdogant:master Jan 13, 2025
2 checks passed
@erdogant
Copy link
Owner

Thank you for the updates! I will run some tests first and if all is fine, I will release a new version.

@dstrain115
Copy link
Contributor Author

@erdogant No problem. You may want to look over the rest for other incompatibilities with the new pandas version. These were the only ones that generated deprecation warnings with the code we used.

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.

2 participants