pigeon-hole (n.)
also pigeonhole, 1570s, "a small recess for pigeons to nest in," from pigeon + hole (n.). Meaning "a compartment in a writing desk," etc. is from 1680s, based on resemblance. The verb is from 1840 literally; figurative sense of "label mentally" is from 1870.
[Y]ou will have an inspector after you with note-book and ink-horn, and you will be booked and pigeon-holed for further use when wanted. ["Civilisation--The Census," "Blackwood's Magazine," Oct. 1854]
Related: Pigeonholed.