Alphabet Inc's Google will ban political advertising on its platform before the Canadian federal election, after the country introduced stringent transparency rules.