How to write electronic configuration of p-orbitals?
Electrons don't pair up in orbitals before each is singly occupied by Hund's rule of maximum multiplicity.
Writing out px, py, pz fully or using p^n notation (n=no of electrons in a p orbital) is a matter of context and circumstance rather than the standard convention; you might use the 'full version' when explaining bonding through hybridization but omit it while stating the electronic configuration of an atom generally. Both notations are quite interchangeable.