import pandas as pd
from great_tables import GT
import gt_extras as gte
= pd.read_csv("../assets/teams_colors_logos.csv")
df = (df.filter(items=["team_nick", "team_abbr", "team_conf", "team_division", "team_wordmark"]).head(8))
df
= GT(df, groupname_col="team_conf", rowname_col="team_nick")
gt = gt.fmt_image(columns="team_wordmark")
gt
gt.pipe(
gte.gt_merge_stack,="team_nick",
col1="team_division",
col2 )
team_abbr | team_wordmark | |
---|---|---|
NFC | ||
Cardinals
NFC West
|
ARI | ![]() |
Falcons
NFC South
|
ATL | ![]() |
Panthers
NFC South
|
CAR | ![]() |
Bears
NFC North
|
CHI | ![]() |
AFC | ||
Ravens
AFC North
|
BAL | ![]() |
Bills
AFC East
|
BUF | ![]() |
Bengals
AFC North
|
CIN | ![]() |
Browns
AFC North
|
CLE | ![]() |