Python Count Unique Values In Numpy Array Append Row Sql