Repository: tqdm/tqdm (Python)

Issue:
Fix a typo in error message
Was having some issues in google colab, there I found this error message with a typo
smoothing not working
The smoothing function does not work. Both the examples below show same result in a notebook. 50% 5/10 [00:15<00:15, 3.01s/it]

I think problem is in tqdm.py where it sets "avg_time=self.avg_time". Then around line 943 sets avg_time but never uses this variable nor assigns it back to self.avg_time.

```
from tqdm import tqdm_notebook as tqdm
from time import sleep
for x in tqdm(range(10), smoothing=0):
    if x==0:
        sleep(10)
    sleep(1)
    if x==5:
        break
```

```
from tqdm import tqdm_notebook as tqdm
from time import sleep
for x in tqdm(range(10), smoothing=1):
    if x==0:
        sleep(10)
    sleep(1)
    if x==5:
        break
```


Hints:

@simonm3 Yes, you're right! This is definitely a bug. Both tqdm and tqdm_notebook do not work.
And your suggestion is likely to be the way to fix it.

Patch:
diff --git a/tqdm/_tqdm.py b/tqdm/_tqdm.py
--- a/tqdm/_tqdm.py
+++ b/tqdm/_tqdm.py
@@ -581,6 +581,10 @@ def inner(df, func, *args, **kwargs):
                             not isinstance(df, _Rolling_and_Expanding):
                         # DataFrame or Panel
                         axis = kwargs.get('axis', 0)
+                        if axis == 'index':
+                            axis = 0
+                        elif axis == 'columns':
+                            axis = 1
                         # when axis=0, total is shape[axis1]
                         total = df.size // df.shape[axis]
 
@@ -948,6 +952,7 @@ def __iter__(self):
                                 if avg_time is None \
                                 else smoothing * delta_t / delta_it + \
                                 (1 - smoothing) * avg_time
+                            self.avg_time = avg_time
 
                         self.n = n
                         with self._lock:
diff --git a/tqdm/_tqdm_notebook.py b/tqdm/_tqdm_notebook.py
--- a/tqdm/_tqdm_notebook.py
+++ b/tqdm/_tqdm_notebook.py
@@ -102,7 +102,7 @@ def status_printer(_, total=None, desc=None, ncols=None):
         except NameError:
             # #187 #451 #558
             raise ImportError(
-                "IntProgress not found. Please update juputer and ipywidgets."
+                "IntProgress not found. Please update jupyter and ipywidgets."
                 " See https://ipywidgets.readthedocs.io/en/stable"
                 "/user_install.html")
 


Test patch:
diff --git a/tqdm/tests/tests_pandas.py b/tqdm/tests/tests_pandas.py
--- a/tqdm/tests/tests_pandas.py
+++ b/tqdm/tests/tests_pandas.py
@@ -33,12 +33,12 @@ def test_pandas_rolling_expanding():
         tqdm.pandas(file=our_file, leave=True, ascii=True)
 
         series = pd.Series(randint(0, 50, (123,)))
-        res1 = series.rolling(10).progress_apply(lambda x: 1)
-        res2 = series.rolling(10).apply(lambda x: 1)
+        res1 = series.rolling(10).progress_apply(lambda x: 1, raw=True)
+        res2 = series.rolling(10).apply(lambda x: 1, raw=True)
         assert res1.equals(res2)
 
-        res3 = series.expanding(10).progress_apply(lambda x: 2)
-        res4 = series.expanding(10).apply(lambda x: 2)
+        res3 = series.expanding(10).progress_apply(lambda x: 2, raw=True)
+        res4 = series.expanding(10).apply(lambda x: 2, raw=True)
         assert res3.equals(res4)
 
         expects = ['114it']  # 123-10+1
@@ -104,7 +104,7 @@ def task_func(x):
         assert res1.equals(res2)
 
         # apply
-        for axis in [0, 1]:
+        for axis in [0, 1, 'index', 'columns']:
             res3 = df.progress_apply(task_func, axis=axis)
             res4 = df.apply(task_func, axis=axis)
             assert res3.equals(res4)