TST test_gmm outdated pandas, compat #1891

Closed
josef-pkt opened this Issue Aug 16, 2014 · 1 comment

Projects

None yet

1 participant

@josef-pkt
Member

running the test suite with pandas master, I get this warning

e:\josef\testing\tox\py27e\lib\site-packages\statsmodels-0.6.0-py2.7-win32.egg\statsmodels\sandbox\regression\tests\test_gmm.py:33: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  griliches76_data['D_%i' %yr][i] = 1
@josef-pkt josef-pkt added this to the 0.6 milestone Aug 16, 2014
@josef-pkt
Member

I get another one in anova. I guess introduced in one of my recent changes

e:\josef\testing\tox\py27e\lib\site-packages\statsmodels-0.6.0-py2.7-win32.egg\statsmodels\stats\anova.py:356: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  table.ix[1:]["df_diff"] = -np.diff(table["df_resid"].values)
@josef-pkt josef-pkt added a commit to josef-pkt/statsmodels that referenced this issue Aug 16, 2014
@josef-pkt josef-pkt BUG fix more ix indexing cases for pandas compat closes #1891 ec9d839
@josef-pkt josef-pkt closed this in #1894 Aug 16, 2014
@PierreBdR PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014
@josef-pkt josef-pkt BUG fix more ix indexing cases for pandas compat closes #1891 2ad4d6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment