Skip to content

BUG: Backport: TSA models if date index without known frequency - #3175

Merged
ChadFulton merged 9 commits into
statsmodels:maintenance/0.8.xfrom
ChadFulton:gh-3068-backport
Sep 21, 2016
Merged

ChadFulton merged 9 commits into
statsmodels:maintenance/0.8.xfrom
ChadFulton:gh-3068-backport

Conversation

@ChadFulton

Copy link
Copy Markdown
Member

Backport of #3068.

@ChadFulton

Copy link
Copy Markdown
Member Author

Failures on Pandas == 0.13.0. I think we should not support nanoseconds if Pandas < 0.14; there are too many bugs still in that version. For example:

>>> print(pd.to_datetime(100))
1970-01-01 00:00:00
>>> print(pd.to_datetime(1000))
1970-01-01 00:00:00.000001
>>> print(pd.to_datetime(100).to_period('N'))
1970-01-01 00:00:00.000000000
>>> print(pd.to_datetime(999).to_period('N'))
1970-01-01 00:00:00.000000000
>>> print(pd.to_datetime(1000).to_period('N'))
1970-01-01 00:00:00.000001000

and more importantly for us, the end result is that we can't create the extended index for nanosecond frequency because of this weird behavior:

>>> x = pd.to_datetime(np.arange(10))
>>> pd.DatetimeIndex(start=x[0], end=x[9], freq=pd.offsets.Nano())
<class 'pandas.tseries.index.DatetimeIndex'>
[1970-01-01 00:00:00]
Length: 1, Freq: N, Timezone: None

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.01%) to 89.242% when pulling 22e7121 on ChadFulton:gh-3068-backport into aa01450 on statsmodels:maintenance/0.8.x.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.008%) to 89.247% when pulling 30b0f7f on ChadFulton:gh-3068-backport into aa01450 on statsmodels:maintenance/0.8.x.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 89.241% when pulling 63a49e0 on ChadFulton:gh-3068-backport into 1ac3f11 on statsmodels:maintenance/0.8.x.

@ChadFulton

Copy link
Copy Markdown
Member Author

Somehow I messed up this backport PR, but I have re-created it and if it comes back green I will merge.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 89.241% when pulling 2c52709 on ChadFulton:gh-3068-backport into 1ac3f11 on statsmodels:maintenance/0.8.x.

@ChadFulton
ChadFulton merged commit 8be0ed2 into statsmodels:maintenance/0.8.x Sep 21, 2016
@ChadFulton
ChadFulton deleted the gh-3068-backport branch September 21, 2016 13:57
This was referenced Feb 1, 2017
@josef-pkt josef-pkt added this to the 0.8 milestone Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants