title: How do I make a progress bar for loading pandas DataFrame from a large xlsx file?
body: <p>from <a href="https://pypi.org/project/tqdm/" rel="noreferrer">https://pypi.org/project/tqdm/</a>:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from tqdm import tqdm
  
  df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
  tqdm.pandas(desc="my bar!")p`
  df.progress_apply(lambda x: x**2)
  </code></pre>
  
  <p>I took this code and edited it so that I create a DataFrame from load_excel rather than using random numbers:</p>
  
  <pre><code>import pandas as pd
  from tqdm import tqdm
  import numpy as np
  
  filename="huge_file.xlsx"
  df = pd.DataFrame(pd.read_excel(filename))
  tqdm.pandas()
  df.progress_apply(lambda x: x**2)
  </code></pre>
  
  <p>This gave me an error, so I changed df.progress_apply to this:</p>
  
  <pre><code>df.progress_apply(lambda x: x)
  </code></pre>
  
  <p>Here is the final code:</p>
  
  <pre><code>import pandas as pd
  from tqdm import tqdm
  import numpy as np
  
  filename="huge_file.xlsx"
  df = pd.DataFrame(pd.read_excel(filename))
  tqdm.pandas()
  df.progress_apply(lambda x: x)
  </code></pre>
  
  <p>This results in a progress bar, but it doesn't actually show any progress, rather it loads the bar, and when the operation is done it jumps to 100%, defeating the purpose.</p>
  
  <p>My question is this:  How do I make this progress bar work?<br>
  What does the function inside of progress_apply actually do?<br>
  Is there a better approach?  Maybe an alternative to tqdm?  </p>
  
  <p>Any help is greatly appreciated.  </p>