Concept:
Ketones react with hydrazine \( (\mathrm{NH_2-NH_2}) \) in a condensation reaction to form hydrazones.
This reaction involves nucleophilic attack of hydrazine on the carbonyl carbon followed by elimination of water.
General reaction:
\[
R_2C=O + NH_2NH_2 \rightarrow R_2C=NNH_2 + H_2O
\]
The product \(R_2C=NNH_2\) is called a hydrazone.
Step 1: {Identify the functional group in ketones.}
Ketones contain the carbonyl group:
\[
R_2C=O
\]
Step 2: {Reaction with hydrazine.}
Hydrazine acts as a nucleophile and attacks the carbonyl carbon, forming an intermediate which eliminates water.
Step 3: {Formation of final product.}
The final product contains the functional group
\[
C=NNH_2
\]
which is known as a hydrazone.
Hence, the correct option is (B).