Update Python class to avoid pandas warnings
Budget: $10 – $30 USD
We have a Python API script that processes some data using various utility functions - incl. relying on various pandas functions. You can find guidance on how to install and run the script in a venv here:
https://github.com/CSS-Electronics/api-examples
The relevant script is here:
https://github.com/CSS-Electronics/api-examples/blob/master/examples/data-processing/process_tp_data.py
To simplify the script, you can run a sys.exit() after line 38.
The relevant class is here:
https://github.com/CSS-Electronics/api-examples/blob/master/examples/data-processing/process_tp_data.py
The script works without issues on Python 3.7 with the requirements.txt on github.
However, we’re looking to upgrade to Python 3.8 and the latest pandas 1.4.3 and numpy 1.23.1. As part of this, we have created an updated requirements.txt for the script here:
https://we.tl/t-pwaQy8dsTK
With the updated requirements, the script runs as it should - but there are a ton of warnings, see below console output:
https://we.tl/t-FrRO0vTHn6
In short, we would like you to make a PR of the github repository in which you modify the utils.py file (specifically the MultiFrameDecoder class) so that the warnings are resolved in the “right way” as per the recommended solutions, while still producing the same results as before at the same speed.
Specifically, this involves resolving the “A value is trying to be set on a copy of a slice from a DataFrame” issue and “The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.”.
https://github.com/CSS-Electronics/api-examples
The relevant script is here:
https://github.com/CSS-Electronics/api-examples/blob/master/examples/data-processing/process_tp_data.py
To simplify the script, you can run a sys.exit() after line 38.
The relevant class is here:
https://github.com/CSS-Electronics/api-examples/blob/master/examples/data-processing/process_tp_data.py
The script works without issues on Python 3.7 with the requirements.txt on github.
However, we’re looking to upgrade to Python 3.8 and the latest pandas 1.4.3 and numpy 1.23.1. As part of this, we have created an updated requirements.txt for the script here:
https://we.tl/t-pwaQy8dsTK
With the updated requirements, the script runs as it should - but there are a ton of warnings, see below console output:
https://we.tl/t-FrRO0vTHn6
In short, we would like you to make a PR of the github repository in which you modify the utils.py file (specifically the MultiFrameDecoder class) so that the warnings are resolved in the “right way” as per the recommended solutions, while still producing the same results as before at the same speed.
Specifically, this involves resolving the “A value is trying to be set on a copy of a slice from a DataFrame” issue and “The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.”.