U C^H@sddlZdZdgZddZdS)Nzgithub.com/casperdcl tqdm_pandascOsddlm}t|ts(t|dddrV|dt|ddd tjj d |j ||n*|d t|j d tjj d t|j |d dS) a] Registers the given `tqdm` instance with `pandas.core.groupby.DataFrameGroupBy.progress_apply`. It will even close() the `tqdm` instance upon completion. Parameters ---------- tclass : tqdm class you want to use (eg, tqdm, tqdm_notebook, etc) targs and tkwargs : arguments for the tqdm instance Examples -------- >>> import pandas as pd >>> import numpy as np >>> from tqdm import tqdm, tqdm_pandas >>> >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6))) >>> tqdm_pandas(tqdm, leave=True) # can use tqdm_gui, optional kwargs, etc >>> # Now you can use `progress_apply` instead of `apply` >>> df.groupby(0).progress_apply(lambda x: x**2) References ---------- https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python r)TqdmDeprecationWarning__name__Ztqdm_zCPlease use `tqdm.pandas(...)` instead of `tqdm_pandas(tqdm, ...)`. fileNwrite)Zfp_writezCPlease use `tqdm.pandas(...)` instead of `tqdm_pandas(tqdm(...))`. )Z deprecated_t) Ztqdmr isinstancetypegetattr startswithgetsysstderrrZpandasfp)ZtclassZtargsZtkwargsrr3/tmp/pip-install-6_kvzl1k/tqdm/tqdm/_tqdm_pandas.pyrs )r __author____all__rrrrrs