#How to merge csv rows based on columns into one?
4 messages · Page 1 of 1 (latest)
You can use Group-Object to consolidate rows with the same column name in the first field
Which version of PowerShell are you targeting?
Import-Csv 'example.csv' | Group-Object -Property H2 | Where-Object { $.count -ge 2 } | Foreach-Object { $.Group } | Select H1, H2 | Export-csv -Path output.csv -NoTypeInformation