update readme

This commit is contained in:
Casper da Costa-Luis 2016-07-23 16:27:46 +01:00
parent 05db42ad71
commit 7f6c45cea7
1 changed files with 4 additions and 4 deletions

View File

@ -490,15 +490,15 @@ for ``DataFrame.progress_apply`` and ``DataFrameGroupBy.progress_apply``:
import pandas as pd
import numpy as np
from tqdm import tqdm, tqdm_pandas
from tqdm import tqdm
...
df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
# Create and register a new `tqdm` instance with `pandas`
# (can use tqdm_gui, tqdm_notebook, optional kwargs, etc.)
tqdm_pandas(tqdm, leave=True)
# Register `pandas.progress_apply` with `tqdm`
# (can use `tqdm_gui`, `tqdm_notebook`, optional kwargs, etc.)
tqdm.pandas(desc="my bar!")
# Now you can use `progress_apply` instead of `apply`
df.progress_apply(lambda x: x**2)