Sort digits by their first occurrence in pi

Python 3, 40 39 bytes

1 byte thanks to Jonathan Allan.

lambda s:sorted(s,key="145926870".find)

Try it online!


05AB1E, 10 9 7 bytes

Saved 1 byte thanks to Leaky Nun noting that filtering out duplicates is unnecessary.
Saved 2 bytes thanks to Adnan.

žqRvy†J

Try it online!

Explanation

žq       # push pi to 15 decimals (contains all digits but 0)
  R      # reverse
   vy    # for each char in pi
     †J  # move it's occurrences in the input to the front

Pyth, 8 6 bytes

ox+.n0

Try it here.

-1 thanks to Leaky Nun: The input will provide the 0 if it's ever needed.
Trivial -1 thanks to Jakube: Backtick not needed (ah, how did I miss that, HOW?!?).