'Output not visible in excel
I have tried to insert empty rows in excel sheet using openpyxl though my code is being completely run in python when I see my workbook only some part is executed and the rest is not printed while python is showing whole code is being executed
code :
count = df['VAR_NAME'].value_counts(sort = False).values
val =21 - df['VAR_NAME'].value_counts(sort = False).values
ctr = 0
i=4
j=0
while(i<20000):
if(ctr == 436):
break
ws.insert_rows(i,val[ctr])
i += 21 - count[ctr] + count[ctr + 1]
print(i)
j=j+1
print(f"J={j} ctr={ctr} I={i}")
ctr=ctr+1
the output is showing the whole loop is being executed
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
