Cubist
Cubist copied to clipboard
Replace deprecated DataFrame.applymap
While using cubist, I'm receiving the following warning:
/opt/conda/lib/python3.10/site-packages/cubist/_make_data_string.py:67: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
x = x.applymap(lambda a: a.lstrip())
I suppose that it's possible to solve this by fixing this line:
https://github.com/pjaselin/Cubist/blob/d3e7d6e603d8d527f03a3cb1f78c1fd08d403781/cubist/_make_data_string.py#L67
Hi @ramongss! I'm assuming you're using pandas 2.2. I'm wondering if I need to test whether pandas has the attribute and use one or the other to be safe and backwards compatible.