Increment formula written to excel with Python
问题 The script below reads in multiple csv files, merges some and writes them to an Excel file in two different sheets. It also adds this formula ( =IF(COUNTIFS(Meds!A:A,B2)>0,1,0) ) to the last column in every cell in the Meds column, but I need it to increment, so the second cell would be =IF(COUNTIFS(Meds!A:A,B3)>0,1,0) and so on. I can't figure out how to write a loop which will do this. I saw this post but I have issues using openpyxl, so would like to avoid that library. import pandas as pd