From b502f0d96169d2bfd63f8a5c57782c4d16473875 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 12 Apr 2018 10:05:49 +0000 Subject: [PATCH] allow custom pandas total - fixes #364 - TODO: unit test --- tqdm/_tqdm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tqdm/_tqdm.py b/tqdm/_tqdm.py index ab42ed81..95e07b7d 100755 --- a/tqdm/_tqdm.py +++ b/tqdm/_tqdm.py @@ -559,7 +559,7 @@ class tqdm(object): """ # Precompute total iterations - total = getattr(df, 'ngroups', None) + total = tkwargs.pop("total", getattr(df, 'ngroups', None)) if total is None: # not grouped if df_function == 'applymap': total = df.size