From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../python3.12/site-packages/tqdm/_tqdm_pandas.py | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/tqdm/_tqdm_pandas.py (limited to '.venv/lib/python3.12/site-packages/tqdm/_tqdm_pandas.py') diff --git a/.venv/lib/python3.12/site-packages/tqdm/_tqdm_pandas.py b/.venv/lib/python3.12/site-packages/tqdm/_tqdm_pandas.py new file mode 100644 index 00000000..c4fe6efd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/tqdm/_tqdm_pandas.py @@ -0,0 +1,24 @@ +import sys + +__author__ = "github.com/casperdcl" +__all__ = ['tqdm_pandas'] + + +def tqdm_pandas(tclass, **tqdm_kwargs): + """ + Registers the given `tqdm` instance with + `pandas.core.groupby.DataFrameGroupBy.progress_apply`. + """ + from tqdm import TqdmDeprecationWarning + + if isinstance(tclass, type) or (getattr(tclass, '__name__', '').startswith( + 'tqdm_')): # delayed adapter case + TqdmDeprecationWarning( + "Please use `tqdm.pandas(...)` instead of `tqdm_pandas(tqdm, ...)`.", + fp_write=getattr(tqdm_kwargs.get('file', None), 'write', sys.stderr.write)) + tclass.pandas(**tqdm_kwargs) + else: + TqdmDeprecationWarning( + "Please use `tqdm.pandas(...)` instead of `tqdm_pandas(tqdm(...))`.", + fp_write=getattr(tclass.fp, 'write', sys.stderr.write)) + type(tclass).pandas(deprecated_t=tclass) -- cgit v1.2.3