'module' object has no attribute 'date_range' in python
Question: I am learning pandas in Python.Below is my code in Terimal:

    
    
    import pandas as pd
    dates = pd.date_range('20130101', periods=6)
    

Then I get this message:

    
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'date_range'
    

How to solve this problem?


Answer: You can't find `date_range` because you're using pandas version 0.7.0, which
is very old (~9 Feb 2012) in pandas time-- the current stable version (29 Jan
2015) is 0.15.2.

You're going to want to upgrade, not only because of bug fixes and new
features, but because many of the examples you're going to find on the web
won't work for you otherwise.

