  The LHCb experiment has recorded the world's largest sample of charmed meson
decays. This paper presents a study of a $D^0$ meson decaying into a final
state containing a neutral pion in LHCb. The search for $CP$ violation exploits
a novel model-independent unbinned technique to assign a $p$-value for the no
$CP$ violation hypothesis. With a data sample size exceeding that of previous
measurements by almost an order of magnitude the world's best sensitivity is
obtained. The $p$-value of no CP violation hypothesis given data of
$D^0\rightarrow \pi^-\pi^+\pi^0$ decay analysed is found to be $(2.6 \pm
0.5)\times 10^-2$.
