title: Seemingly error-free python codes experience unreasonably long running time
body: <pre><code>import pandas as pd
  de=pd.read_csv('deal_level_data.csv')
  
  import numpy as np
  
  N = 24  
  de.index = de.index * (N + 1)
  de = de.reindex(np.arange(de.index.max() + N + 1)) 
  
  def convert_int_with_NaNs(x):  
      try:  
          return x.astype('Int64') 
      except Exception:  
          return x 
  
  de = de.apply(convert_int_with_NaNs)
  
  for j in range(0, 14):  
      for i in range(0, len(de.index)):  
          if i % 25 == 0:  
              for a in range(1, 25):  
                  de.iloc[i + a, j] = de.iloc[i, j] 
  </code></pre>
  
  <p>It worked perfectly fine when I changed the '%' sign to something else (+, -, *, /). However, when % was used, the codes did not stop running even after a very long time. So, I would like to ask where the problem was, as the codes seemed to be logically correct. Thank you very much. </p>