Skip to content

deprecation warning when running the pydarm uncertainty routine

/home/louis.dartez/repos/pydarm/pydarm/cmd/_influx.py:99: 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.


  dataframe['oscillator_frequency'].replace({'_': '.'}, inplace=True, regex=True)
/home/louis.dartez/repos/pydarm/pydarm/cmd/uncertainty.py:60: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  data.sort_values(by=['oscillator_frequency'], ascending=True, inplace=True)