'i want to display count of each venue at which the team has won from csv file
here is my js code
const {match} = require("assert")
const csv = require("csv-parser")
const fs = require("fs")
const results = []
fs.createReadStream("IPL Matches 2008-2020.csv")
.pipe(csv({}))
.on("data", (data) => results.push(data))
.on("end", () => {
for(let i=0;i<816;i++){
if("Sunrisers Hyderabad"===results[i].winner){
console.log(results[i].venue)
}
})
here is the console output of list of stadiums, i want to display it something like
Rajiv Gandhi International Stadium, Uppal:2
Feroz Shah Kotla:1
Rajiv Gandhi International Stadium, Uppal
Rajiv Gandhi International Stadium, Uppal
Feroz Shah Kotla
Subrata Roy Sahara Stadium
Rajiv Gandhi International Stadium, Uppal
Rajiv Gandhi International Stadium, Uppal
Rajiv Gandhi International Stadium, Uppal
Punjab Cricket Association Stadium, Mohali
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
