Preparation from compounds containing pyridine rings