Despite looking elegant, existing answers keep the order of columns in the dataframe. If you need the columns to come in the specified order, use list comprehension or inline generator:
df1 = df[(c for c in [1,2,3,4] if c in df.columns)]