(*args, **kwargs)
| 904 | |
| 905 | # Define bar updating wrapper |
| 906 | def wrapper(*args, **kwargs): |
| 907 | # update tbar correctly |
| 908 | # it seems `pandas apply` calls `func` twice |
| 909 | # on the first column/row to decide whether it can |
| 910 | # take a fast or slow code path; so stop when t.total==t.n |
| 911 | t.update(n=1 if not t.total or t.n < t.total else 0) |
| 912 | return func(*args, **kwargs) |
| 913 | |
| 914 | # Apply the provided function (in **kwargs) |
| 915 | # on the df using our wrapper (which provides bar updating) |