get_options_data fails when given only the month · Issue #6105 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
if you call this method using only the month, an UnboundedLocalError exception is trown
goog_opt.get_options_data(month=3)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/io/data.pyc in _get_option_data(self, month, year, expiry, table_loc, name)
639
640 if month:
--> 641 name += m1 + str(year)[-2:]
642 setattr(self, name, option_data)
643 return option_data
UnboundLocalError: local variable 'm1' referenced before assignment
Apparently the issue is in here: https://github.com/pydata/pandas/blob/master/pandas/io/data.py#L639