Preparation by dehydrogenation of hydrogenated pyridine compounds