Inflation rose slightly in October in line with economists' expectations, as the consumer price index was up 2.6% from a year ago and 0.2% compared with last month.