On Data class we have a situation where we need to find the number of languages created in a certain year using 'how_many_year_count' on P, but the way it is passed for us on the videos are not updated, so reading the documentation i found how to fix it:
function how_many_per_year(P, year::Int)
year_count = length(findall(x -> x .== year, P[:, 1]))
return year_count
end
On Data class we have a situation where we need to find the number of languages created in a certain year using 'how_many_year_count' on P, but the way it is passed for us on the videos are not updated, so reading the documentation i found how to fix it:
Thats because findall( ) documentation says that we need to pass the first parameter as a condition to what it should add to the array to count. ( https://docs.julialang.org/en/v1/base/arrays/#Base.findall-Tuple{Function,%20Any} )