Image for post
Image for post
Image by Pexels from Pixabay

Documentation for building a Pandas Dataframe from the FPL API, and running a value analysis on 19/20 season

As of the writing of this tutorial, before match week 30+, I’m ranked #3,919 in the world in Fantasy Premier League Soccer (team: Yin Aubameyang), which equates to the top 0.05% in the world.

It didn’t happen by accident, and it wasn’t all luck.

It’s taken several years of playing this game to learn the patience, skill, and strategy required to succeed. From #1,181,262 in 2011/12 to #39,804 in 2018/19, and now #3,919 in 2019/20 with 8 GWs left:

Image for post
Image for post
A screenshot of the author’s previous season performance on

Over these several years, I’ve learned 2 skills really help:

  1. Identifying your biases
  2. Understanding how to read data

The first will help you stop making stupid mistakes. The second will assist you in uncovering value that other fantasy managers are missing. …

Fantasy Premier League Gameweek 10 Memo, Team Yin AubameYang

Captain Bruno returned with a goal and max bonus points, and defense dominated in Team Yin AubameYang’s highest haul this season: 78 points (-4) and a game week rank of 424,810 — pushing the team up to 4,768,542 overall.

Still garbage, but at least it’s not on fire.

Image for post
Image for post

Fabianksi has returned 15 and 9 in GW8 and GW9, respectively, outscoring Pickford’s entire 2020 season in just two game weeks. It’s a nice reminder that this game can turn on a dime with the right transfer.

Robertson loyalty paid off with a 12 point haul. I was this close to benching the Liverpool fullback against Leicester, betting on Leicester goals, but thankfully decided against it. There is a lesson in here somewhere but I’m not sure what it is; perhaps it’s “don’t try to predict games, just play your best 11.” Random statistic: Robertson has more touches this season than any other player in the PL. …

Fantasy Premier League Gameweek 9 Memo, Team Yin AubameYang

Transferring in Fabianski for Pickford payed off. Captaining Son did not.

It was a decent GW8, overall, with 63 points (-4 hit) and a GW rank of 2,207,060, moving the overall rank from 5,688,832 to 5,404,587.

Image for post
Image for post

Bamford rewarded me with a goal, the first return since bringing him in after his hattrick. The Leed’s man is top of the charts for value at the moment (below), thanks to the 7 goals he’s scored in 8 game weeks. I’m happy to have him in the team now, after I incorrectly predicting a Pukki-like fall from grace after his first 3 game weeks. What did I learn? Bamford plays for a better team. …

Fantasy Premier League Gameweek 8 Memo, Team Yin AubameYang

Another poor gameweek but I’ve managed to minimize the frustration, despite (1) former forward Mitrović finally getting a decent haul while my new man Bamford blanks (2) Pickford seeing the bench and (3) playing a 9 man team without a substitute defender or goalkeeper.

But it could have been much worse. Podence, Barnes, and Kane managed to “save” a gameweek that could have been much, much worse.

Image for post
Image for post

GW7 rank: 6,502,340

Overall rank: 5,688,832

Liverpool continue to give up goals in a surprisingly good AND bad start to the season. Going forward, they are strong — scoring 17 goals so far in the league. …

Image for post
Image for post

Fantasy Premier League Gameweek 7 Memo, Team Yin AubameYang

After some time off cavorting with friends deep in one of the glorious deserts of the Western United States, the FPL Memo is back in action. Though it looks like Digne, Ake, and Mitchell may not be. This spells trouble for my defensive line, but — with my free transfer burned swapping Bamford for Mitrovic — I’m going to risk a 10-man team instead of taking a hit.

Patience. I knew I had it in me somewhere.

In addition to a new-found patience and a diminished emotional investment in the game, the theme this week and beyond is to let my eye test and intuition dominate decisions for a while, instead of research and analysis. …

Fantasy Premier League Gameweek 4 Retro, Gameweek 5 Memo, Team Yin AubameYang

It’s Saturday morning, and I’m walking to the couch to flip open my computer after a morning playing soccer. I’m nervous with excitement, and I can’t wait to watch my active fantasy players earn some points.

I navigate to to pull up the Everton vs. Brighton match.

As soon as my screen loads, I witness Everton’s Jordan Pickford — who I own — drop a ball in front of Brighton’s Neil Maupay — who I don’t own. Maupay reacts firsts and pokes the ball over the line for a goal.

I surprise myself by yelling “F%%K” as loud as I’ve ever yelled anything. …

Fantasy Premier League Retro Analysis Memo, Gameweek 3, and Team Memo, Gameweek 4 — Team Yin AubameYang

An offensive defense wins the day for Team Yin AubameYang, helping my team begin the bounce out of the bottom after a tremendously terrible start to the 2020/21 FPL Season.

GW2 Overall Rank: 5,132,692 vs. 6,736,798

GW3 Overall Rank: 4,311,681 vs. 6,918,626

Total Points: 131

In a season filled with goals and penalties, the best defensive selections hedge against a busted cleansheet with goals, assists, and bonus — but they’ll cost you, removing valuable budget from the midfield and forward lines.

No where is this more apparent than with the Liverpool fullback duo: Trent Alexander-Arnold and Andrew Robertson.

Despite giving up a goal to Arsenal on Monday, TAA and Robertson both registered offensive contributions, with TAA serving a cross to Robertson who belted in the ball, giving Liverpool the 2–1 lead. …

Image by Free-Photos from Pixabay
Image by Free-Photos from Pixabay
Image by Free-Photos from Pixabay

Documentation for Creating a Master DataFrame of All Player Gameweek Histories for the Current Season, and All Past Season Histories

Howdy folks. Seems my first FPL API tutorial was a hit, so I’m back with another Python/Pandas Fantasy Premier League API tutorial for you all.

This time, we’ll be creating two different DataFrames: (1) a DataFrame that contains the current season’s gameweek histories for each player and (2) a DataFrame that contains all past season histories for each player.

This will be an excellent introduction into using the Requests package to hit an API endpoint and build a DataFrame, and an equally excellent introduction into using a Python “For Loop” to iterate over a sequence of player id’s and hit the /api/element-summary/{element_id} for each player. …

Fantasy Premier League Team Selection Memo, Gameweek 3, Team Yin AubameYang

The ugly keeps getting uglier. Is this the gameweek that the ship finally turns? We’ll line up in a 442 this week, with the investment in the back continuing.

Overall Points: 77

Overall Rank: 5,132,692 vs. 6,790,622

Table of Contents:

  1. Goal
  2. Defense
  3. Midfield
  4. Forward
  5. Starting Lineup


Image for post
Image for post

With the wildcard already burned, there was never any doubt. ✅ Pickford stays, and we will hope for a cleansheet against Crystal Palace.

The 2019/20 season saw CP score fewer goals than any other Premier League side. In the first two games of the 2020/21 season, CP has put in 4 goals and won 2 out of 2; winning 1:0 at home against Southampton, and then winning 3:1 away to a sleepy Manchester United. …

Fantasy Premier League Retro Analysis Memo, Gameweek 2, Team Yin AubameYang

The spiral to the bottom continues in GW2 after a failed wildcard attempt sees Ings, Son, and Kane out of my team with Rashford, Fernandes, and Martial in.

My bias for Manchester United is on full display and is determined to wreck my season if I’m not careful.

Lessons remembered:

  • Be patient
  • Understand your bias

Let’s hope its not too late to remember these lessons and turn the ship around.

GW1 rank: 4,810,202

GW2 rank: 4,870,556

Overall rank: 🔻 5,132,692 vs. 6,736,798

Table of Contents:

  1. GW 2 Team Retro
  2. GW 2 Misc. Stats Review
  3. Watchlist

GW 2 Team Retro

My post-wildcard GW2 team earned me 46 points, and a gameweek rank of 4,870,556. …


David Allen

Documentation and tutorials on Python, Programming, and Data Analysis. FPL Addict. Occasionally writing about biohacking, PMing, and food.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store