This solved my problem.
import pandas as pd
df1 = pd.read_csv('input.csv')
df2 = df1.loc[df1['Code'].astype(str).str.len() >12]
df2 = df2.reindex(['Id','Name','Code','Changed Code'],axis=1)
df2.loc[df2['Code'].astype(str).str.len() >12,'Changed Code']='0'
df2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…