A 1,3-diketone resin was developed as the basis for a selective scavenger for hydrazines. In addition, it can be employed for the selective removal of primary amines in the presence of secondary amines which is of fundamental importance in the purification of reductive alkylations. The resin’s specificity is based on the sequestration of the hydrazine via their polymer-attached pyrazoles and of the primary amines via their enamines.