✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

DataTable conditional format if value larger than previous column value with dynamic columns

Hi, I have a DataTable which has month by month columns with values and want to show if the value has increased or decreased based on previous months value. My columns are dynamic, just to make things slightly more complicated.

df = pd.DataFrame([[2,3,1], [3,2,2], [2,4,4]], columns=[“JAN20”,“FEB20”,“MAR20”])