Skip to content

Commit 71b9867

Browse files
committed
added tqdm support
1 parent 611254d commit 71b9867

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def run(self):
4141
'scikit-learn>=0.15.0',
4242
'scipy>=0.14',
4343
'pandas>=0.11.0',
44-
'numpy>=1.6.1'],
44+
'numpy>=1.6.1',
45+
'tqdm>=4.46.0'],
4546
tests_require=['pytest', 'mock'],
4647
cmdclass={'test': PyTest},
4748
)

sklearn_pandas/dataframe_mapper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import sys
22
import contextlib
33

4+
from tqdm import tqdm
45
import pandas as pd
56
import numpy as np
67
from scipy import sparse
@@ -210,7 +211,7 @@ def fit(self, X, y=None):
210211
"""
211212
self._build()
212213

213-
for columns, transformers, options in self.built_features:
214+
for columns, transformers, options in tqdm(self.built_features):
214215
input_df = options.get('input_df', self.input_df)
215216

216217
if transformers is not None:
@@ -289,7 +290,7 @@ def _transform(self, X, y=None, do_fit=False):
289290

290291
extracted = []
291292
self.transformed_names_ = []
292-
for columns, transformers, options in self.built_features:
293+
for columns, transformers, options in tqdm(self.built_features):
293294
input_df = options.get('input_df', self.input_df)
294295

295296
# columns could be a string or list of

0 commit comments

Comments
 (0)