Skip to content

Conversation

mjmiossec
Copy link

These tiny changes, though not esthetically pleasing, address the following FutureWarning by removing the deprecated inplace option:

"FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

styles["linewidth"].fillna(1, inplace=True)"
(a similar warning is generated for each of three lines)

These tiny changes, though not esthetically pleasing, address the following FutureWarning by removing the deprecated inplace option:

"FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.

For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.

  styles["linewidth"].fillna(1, inplace=True)"
(a similar warning is generated for each of three lines)
@jamestwebber
Copy link

It would be nice to get this in, so I can remove the warnings.simplefilter from my code.

@el-hult
Copy link

el-hult commented Jan 9, 2025

this would fix #281

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.

3 participants