you could do this with the column headers being:
VMName,CPU,MEM
$vmlist = Import-CSV C:\csvfile.csv
foreach ($item in $vmlist) {
$vmname = $item.vmname
$cpu = $item.cpu
$mem = [int]$item.mem * 1024
Set-VM -VM $vmname -NumCpu $cpu -MemoryMB $mem -RunAsync -Confirm:$false
}