unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.91k stars 858 forks source link

Replacing the obsolete applymap with map #2435

Closed quant12345 closed 2 months ago

quant12345 commented 2 months ago

DataFrame.applymap has been deprecated.

I'd like to do a PR to fix this. What does the community think?

Warning:

darts/tests/test_timeseries_multivariate.py::TestTimeSeries::test_map

  /darts/darts/tests/test_timeseries.py:1449: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    df_0[["0"]] = df_0[["0"]].applymap(fn)

darts/tests/test_timeseries.py::TestTimeSeries::test_map
darts/tests/test_timeseries_multivariate.py::TestTimeSeries::test_map
  /darts/darts/tests/test_timeseries.py:1450: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    df_2[["2"]] = df_2[["2"]].applymap(fn)

darts/tests/test_timeseries.py::TestTimeSeries::test_map
darts/tests/test_timeseries_multivariate.py::TestTimeSeries::test_map
  /darts/darts/tests/test_timeseries.py:1451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    df_01[["0", "1"]] = df_01[["0", "1"]].applymap(fn)

darts/tests/test_timeseries.py::TestTimeSeries::test_map
darts/tests/test_timeseries_multivariate.py::TestTimeSeries::test_map
  /darts/darts/tests/test_timeseries.py:1452: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
    df_012 = df_012.applymap(fn)
madtoinou commented 2 months ago

Hi @quant12345,

Sure, you can go ahead :)

quant12345 commented 2 months ago

Hi @madtoinou, contribution says that need an issue first, so I asked)

dennisbader commented 2 months ago

Fixed in #2436