{% extends "layout.html" %} {% block body %}

Replace df with the dataframe variable you use

df[{{col2}}]=df[{{col1}}].map({{final}}).fillna(df[{{col2}}])

{% endblock %}