  Cometary studies suggest that the organic composition of the early Solar
Nebula was rich in complex nitrile species such a CH$_3$CN. Recent ALMA
detections in protoplanetary disks suggest that these species may be common
during planet and comet formation, but connecting gas phase measurements to
cometary abundances first requires constraints on formation chemistry and
distributions of these species. We present here the detection of seven
spatially resolved transitions of CH$_3$CN in the protoplanetary disk around
the T-Tauri star TW Hya. Using a rotational diagram analysis we find a
disk-averaged column density of N$_T$=1.45$^{+0.19}_{-0.15}\times10^{12}$
cm$^{-2}$ and a rotational temperature of T$_{rot}$=32.7$^{+3.9}_{-3.4}$ K. A
radially resolved rotational diagram shows the rotational temperature to be
constant across the disk, suggesting that the CH$_3$CN emission originates from
a layer at z/r$\sim$0.3. Through comparison of the observations with
predictions from a disk chemistry model, we find that grain-surface reactions
likely dominate CH$_3$CN formation and that in situ disk chemistry is
sufficient to explain the observed CH$_3$CN column density profile without
invoking inheritance from the protostellar phase. However, the same model fails
to reproduce a Solar System cometary abundance of CH$_3$CN relative to H$_2$O
in the midplane, suggesting that either vigorous vertical mixing or some degree
of inheritance from interstellar ices occurred in the Solar Nebula.
