Gist a41979f68ef67d82ce9476f23d63d1bb
✓ Published0🌍 Public
CConorAspell
Last edited May 18, 2022
Created on May 18, 2022
This example shows a serverless recommendation system that suggests a single player transfer for a Fantasy Premier League team, identifying one player to sell and one to buy. It displays the result as a simple text message, such as "PlayerName -> PlayerName". The code uses AWS Lambda with Python, retrieving player data from an S3 bucket and fetching current team picks from the Fantasy Premier League API. It calculates transfer suggestions by filtering potential replacements based on position, budget, and team constraints, then sorts players by pre-computed in/out weight columns in the CSV data. The implementation relies on the pandas library for data manipulation and the requests library for API calls.
AI-generated description