Skip to content

Commit

Permalink
fix Codacy/PR Quality Review warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Guangshuo CHEN committed Mar 17, 2018
1 parent cf7cc1c commit ff63a31
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tqdm/_tqdm.py
Expand Up @@ -567,11 +567,10 @@ def inner(df, func, *args, **kwargs):
Except func, normal arguments are intentionally \
not supported by (DataFrame|Series|GroupBy).progress_apply. \
Use keyword arguments instead.""", fp_write=getattr(t.fp, 'write', sys.stderr.write))

# Define bar updating wrapper
def wrapper(*args, **kwargs):
# update tbar correctly
# it seems pandas apply calls func twice on the first column/row
# it seems pandas apply calls func twice on the first column/row
# to decide whether it can take a fast or slow code path.
# so stop when t.total==t.n
t.update(n=1 if t.total and t.n < t.total else 0)
Expand Down

0 comments on commit ff63a31

Please sign in to comment.