OS X unknown ghost text expansion automatically!
I think I've found the solution to your problem because I was experiencing something similar but with another string of text.  Are you using Dash?  It's an awesome tool but I didn't realise what it's snippet feature was doing.  If you have a snippet called "pi" then whenever that phrase is typed globally across your mac while ever Dash is running, it will substitute it with what is in your snippet.  See from the author's page here about a hint to put a ` on the end of snippets to avoid this accidentally occuring. 

https://kapeli.com/dash_guide#snippets

Hope this helps!