The following lines give AttributeError: 'module' object has no attribute 'bdate_range'.
I think this might have something to do with a circular reference; but, I don’t know where.
import pandas as pd
times = pd.bdate_range(start=pd.datetime(2012,11,14,0,0,0),
end=pd.datetime(2012,11,17,0,0,0),
freq='10T')
This is the traceback:
AttributeError Traceback (most recent call last)
<ipython-input-3-1eb62db1246d> in <module>()
4
5
----> 6 times = pd.bdate_range(start=pd.datetime(2012,11,14,0,0,0),end=pd.datetime(2012,11,17,0,0,0),
freq='10T')
7 filtered_times = [x for x in times if x.time() >= time(9,30) and x.time() <= time(16,20)]
8 prices = randn(len(filtered_times))
AttributeError: 'module' object has no attribute 'bdate_range'
The
bdate_rangefunction was introduced in pandas version 0.8.0. So this ought to work fine if you upgrade to pandas >= 0.8.0 (and I would recommend using the latest stable release).Note: The pandas website allows you to search the docs by version number (select your versions’s docs on the right-hand side of the main page). In version 0.7.3 there are no search results for
bdate_range.For the latest features and bug-fixes, keep your favourite Data Analysis library up-to-date!