Repository: pandas-dev/pandas

Issue:
vb_suite parser.py can shadow builtin parser module
This is identical to Tom Augspurger's issue [here](https://groups.google.com/d/msg/pydata/pxFe_ISulyA/Upyjnx96P-UJ).  

Under some circumstances, you can't run the performance tests:

```
~/sys/pandas$ ./test_perf.sh 
Traceback (most recent call last):
  File "/home/mcneil/sys/pandas/vb_suite/test_perf.py", line 55, in <module>
    import pandas as pd
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_75_g7d9e9fa-py2.7-linux-i686.egg/pandas/__init__.py", line 37, in <module>
    import pandas.core.config_init
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_75_g7d9e9fa-py2.7-linux-i686.egg/pandas/core/config_init.py", line 17, in <module>
    from pandas.core.format import detect_console_encoding
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_75_g7d9e9fa-py2.7-linux-i686.egg/pandas/core/format.py", line 9, in <module>
    from pandas.core.index import Index, MultiIndex, _ensure_index
  File "/usr/local/lib/python2.7/dist-packages/pandas-0.13.0_75_g7d9e9fa-py2.7-linux-i686.egg/pandas/core/index.py", line 11, in <module>
    import pandas.index as _index
  File "index.pyx", line 34, in init pandas.index (pandas/index.c:16227)
  File "/usr/local/lib/python2.7/dist-packages/pytz/__init__.py", line 29, in <module>
    from pkg_resources import resource_stream
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 76, in <module>
    import parser
  File "/home/mcneil/sys/pandas/vb_suite/parser.py", line 1, in <module>
    from vbench.api import Benchmark
  File "/usr/local/lib/python2.7/dist-packages/vbench/__init__.py", line 2, in <module>
    import vbench.log
  File "/usr/local/lib/python2.7/dist-packages/vbench/log.py", line 34, in <module>
    from vbench.config import is_interactive
  File "/usr/local/lib/python2.7/dist-packages/vbench/config.py", line 4, in <module>
    TIME_ZONE = pytz.timezone('US/Eastern')
AttributeError: 'module' object has no attribute 'timezone'
```

This happens because pytz does

```
from pkg_resources import resource_stream
```

which itself calls

```
import parser
```

which is picking up `pandas/vb_suite/parser.py` instead of the builtin parser module.  Net result: the `pytz` import never manages to get to the point where `timezone` is defined.

As expected, renaming `parser.py` solves the problem (and restoring the original name creates it again).  



Discussion:

Resolving patch:
diff --git a/pandas/core/frame.py b/pandas/core/frame.py
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -1444,7 +1444,7 @@ def info(self, verbose=True, buf=None, max_cols=None):
 
                 count= ""
                 if show_counts:
-                    count = counts[i]
+                    count = counts.iloc[i]
 
                 lines.append(_put_str(col, space) +
                              tmpl % (count, dtype))
diff --git a/vb_suite/parser.py b/vb_suite/parser_vb.py
similarity index 100%
rename from vb_suite/parser.py
rename to vb_suite/parser_vb.py
diff --git a/vb_suite/suite.py b/vb_suite/suite.py
--- a/vb_suite/suite.py
+++ b/vb_suite/suite.py
@@ -17,12 +17,12 @@
            'miscellaneous',
            'panel_ctor',
            'packers',
-           'parser',
+           'parser_vb',
            'plotting',
            'reindex',
            'replace',
            'sparse',
-           'strings',           
+           'strings',
            'reshape',
            'stat_ops',
            'timeseries',


Test patch: