matchID-project / backend

Backend (Docker & API) for matchID project
https://matchID-project.github.io
GNU Lesser General Public License v3.0
11 stars 14 forks source link

Pandas Deprecation removal #342

Open rhanka opened 1 month ago

rhanka commented 1 month ago

Summary by CodeRabbit

coderabbitai[bot] commented 1 month ago

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent changes streamline data processing across several components by replacing inefficient methods with more efficient alternatives. Key modifications involve switching from applymap to apply and map, enhancing DataFrame manipulation, and refining numerical data handling to improve clarity and performance. A static identifier replaces dynamic generation in the Makefile, simplifying the build process. Overall, these updates enhance code maintainability and readability.

Changes

Files Change Summary
Makefile Changed id variable assignment from a dynamic base64 string generation to a static string myid, simplifying the build process.
code/api.py Replaced applymap with apply and map for more efficient DataFrame column handling in post and put methods, improving performance and clarity in data transformations.
code/recipes.py Enhanced data processing in prepare_categorical and prepare_numerical methods by updating missing value handling and using np.where instead of applymap, improving robustness and performance.

Poem

In the fields of code so bright,
Changes hop with pure delight,
Data dances, swift and free,
Processing flows like a gentle breeze.
“My ID’s set!” the rabbit grins,
As clarity wins, and performance spins! 🐇✨

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)