How to fill a grid with data from a csv

I want to generate a grid and populate each cell with values from a row in a csv file.

The for loop in the grid puts everything in one cell and does not generate multiple cells. How do I do this?

// CSV Data
//typ,score,sex
//A,89,m
//B,78,f


#let data = csv("data.csv", row-type: dictionary)


#set page(paper: "us-letter", margin: (top: 0cm, bottom: 0cm, left: 0cm, right: 0cm))

#grid(columns: 5, stroke: black, for item in data {
  grid.cell(item.score + item.sex)  
}
)


Use spreading. See Table guide – Typst Documentation.

// CSV Data
#let data = ```csv
typ,score,sex
A,89,m
B,78,f
```.text

#let data = csv(bytes(data), row-type: dictionary)

// #set page(paper: "us-letter", margin: 0pt)

#table(
  columns: 5,
  ..data.map(item => item.score + item.sex),
  // ..for item in data {
  //   (item.score + item.sex,)
  // },
)

image

Thanks that worked! I can work from there.