DEV Community

Xpect
Xpect

Posted on

Corners and Yellow Cards per Match by League: One Match Table, SQL and pandas, 2025/26 vs 2026/27

Most football stat sites show you "corners per match" as a finished number. Computing it yourself takes about ten lines once all matches live in one table. Here is the exact approach we use for four leagues, with the real output for 2025/26 against 2026/27 so far. It is the same pipeline that produces our goal averages for every league, by TohaProBets, just pointed at corners and cards instead of goals.

The table

One row per match. Nothing is stored per team, because every team split can be derived later.

CREATE TABLE matches (
  league        TEXT,     -- 'APL', 'La Liga', 'Serie A', 'BR Serie A'
  season        TEXT,     -- '2526', '2627', or '2025', '2026' for Brazil
  date          TEXT,
  home, away    TEXT,
  hg, ag        INTEGER,  -- goals
  hc, ac        INTEGER,  -- corners won by each side
  hy, ay        INTEGER,  -- yellow cards
  referee       TEXT
);
Enter fullscreen mode Exit fullscreen mode

A real row looks like this: ('2026-10-24', 'Arsenal', 'Everton', 2, 0, 12, 3, 1, 3, 'Tony Harrington'). Arsenal won 12 corners, Everton 3, and four yellows were shown.

Per-league averages in SQL

SELECT league, season, COUNT(*) AS n,
       ROUND(AVG(hc + ac), 2) AS corners,
       ROUND(AVG(hy + ay), 2) AS yellows,
       ROUND(100.0 * AVG(hc + ac > 9.5), 1) AS corners_over_9_5,
       ROUND(100.0 * AVG(hy + ay > 4.5), 1) AS yellows_over_4_5
FROM matches
WHERE hc IS NOT NULL
GROUP BY league, season;
Enter fullscreen mode Exit fullscreen mode

The WHERE hc IS NOT NULL line matters: friendlies and some cup games arrive without corner data, and averaging over NULLs silently shrinks the sample. In this dataset every league row has corners, so n equals the full match count.

The same in pandas

df["corners"] = df.hc + df.ac
df["yellows"] = df.hy + df.ay
out = (df.dropna(subset=["hc"])
         .groupby(["league", "season"])
         .agg(n=("corners", "size"),
              corners=("corners", "mean"),
              yellows=("yellows", "mean"),
              c95=("corners", lambda s: (s > 9.5).mean() * 100),
              y45=("yellows", lambda s: (s > 4.5).mean() * 100))
         .round(2))
Enter fullscreen mode Exit fullscreen mode

The output

European data runs to 8 November 2026, Brazil to 18 November.

League Season Matches Corners Over 9.5 Yellows Over 4.5
APL 2025/26 380 10.00 56.3% 3.75 33.9%
APL 2026/27 100 9.50 47.0% 4.01 39.0%
La Liga 2025/26 380 9.67 48.2% 4.41 44.2%
La Liga 2026/27 119 9.74 50.4% 4.44 48.7%
Serie A 2025/26 380 8.82 40.3% 3.70 30.8%
Serie A 2026/27 110 9.76 45.5% 3.22 26.4%
Brazil 2025 380 9.92 50.8% 4.93 56.3%
Brazil 2026 345 10.54 57.7% 4.58 49.0%

Three things jump out. England lost half a corner per match (10.00 to 9.50) but gained a quarter of a yellow (3.75 to 4.01). Serie A moved the other way on both: almost one extra corner (8.82 to 9.76) and half a card fewer (3.70 to 3.22). Brazil 2026 is the highest of all eight rows on both counts. The same aggregation for goals gives Serie A 3.11 per match against 2.43 last season.

Home and away splits

Split the sum back into its two columns and you get the home edge:

df.groupby(["league", "season"])[["hc", "ac", "hy", "ay"]].mean()
Enter fullscreen mode Exit fullscreen mode

For 2026/27: APL home corners 5.00 against 4.50 away, La Liga 5.31 against 4.43, Serie A 5.03 against 4.74, Brazil 6.08 against 4.46. Away teams collect more yellows in England (2.23 against 1.78), while in Serie A the split is exactly level at 1.61 each.

Team level with one filter

The same table answers team questions. Newcastle's home corners this season:

SELECT AVG(hc), AVG(ac) FROM matches
WHERE league = 'APL' AND season = '2627' AND home = 'Newcastle';
Enter fullscreen mode Exit fullscreen mode

Result: 3.6 won, 5.2 conceded over five games, down from 6.79 and 4.95 last season. A team-level number like this, set against the league baseline above, is the starting point for how Xpect turns match history into probabilities.

Pitfalls

  • Sample size. Ten rounds is 100 matches in England; a 0.5 shift is meaningful at league level but not for one team.
  • Season keys. Brazil runs on calendar years, Europe across two years. Keep the key as text and never sort it as an integer.
  • Corner direction. Store corners won by each side, not "for" and "against", and derive the latter per team. Otherwise the home and away views disagree.

Top comments (0)