Paul McCartney got "Rigby" from the name of a store and "Eleanor" from actress Eleanor Bron. He liked the name "Eleanor Rigby" because it sounded natural.
btw..There is a gravestone for an Eleanor Rigby in St. Peter's Churchyard in Wooton, England. but mccartney was unaware of this when he wrote the song...