Skip to content

example/regressions.py throws error #9389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tvyomkesh opened this issue Feb 1, 2015 · 3 comments
Closed

example/regressions.py throws error #9389

tvyomkesh opened this issue Feb 1, 2015 · 3 comments

Comments

@tvyomkesh
Copy link
Contributor

When I try to run python example/regressions.py it throws this error

Traceback (most recent call last):
  File "examples/regressions.py", line 12, in <module>
    dateRange = DatetimeIndex(start, periods=N)
  File "/Users/vyomkesh/code/pandas/pandas/util/decorators.py", line 88, in wrapper
    return func(*args, **kwargs)
  File "/Users/vyomkesh/code/pandas/pandas/tseries/index.py", line 240, in __new__
    data = list(data)
TypeError: 'datetime.datetime' object is not iterable
@tvyomkesh
Copy link
Contributor Author

Looks like using the date_range method fixes the error.

@jorisvandenbossche
Copy link
Member

@tvyomkesh Thanks for looking into the examples!

But apart from fixing the examples, I think we should think for a moment what we want to do with these examples. Why do we want them? What is their function?
And depending on that, do we want to update/extend them? Or maybe move them to the docs?

I personally never looked at these examples. And they are also quite outdated. Eg using the ols from pandas is somewhat (unofficially) deprecated for the use of statsmodels, and the finance module in matplotlib is deprecated starting from matplotlib 1.4. And to get such data, I think pandas-datareader should be used.

@jreback
Copy link
Contributor

jreback commented Feb 1, 2015

I think that these should be checked to see if they are in the docs ; if not and appropriate add any
then blow away the entire directory
these are just duplicate, not maintained, not tested and pretty much superfluous to the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants