Pyridine is often used to prevent the buildup of sulfuric acid, although the use of imidazole and diethanolamine for this role are becoming more common.
By treatment of the glycosylamine with pyridine and acetic anhydride, the imine group rearranges and the intermediate enol, in turn, rearranges to the ketone.