Bug multicomp pandas #1895

Merged
merged 3 commits into from Aug 16, 2014

Projects

None yet

2 participants

@josef-pkt
Member

MultiComparison didn't use the asarrayed data, failed on pandas.Series

fix and test closes #1890

josef-pkt added some commits Aug 16, 2014
@josef-pkt josef-pkt BUG: MultiComparison use array for groups closes #1890 177b7c3
@josef-pkt josef-pkt TST: add tukeyhsd/MultiComparison test with pandas.Series
3fa3199
@josef-pkt josef-pkt added this to the 0.6 milestone Aug 16, 2014
@josef-pkt
Member

fails on python 3.3 with the pandas version,
string versus bytes in labels
but also the table is arranged in the wrong way

Oh joy.

@coveralls

Coverage Status

Coverage increased (+0.0%) when pulling 3fa3199 on josef-pkt:BUG_multicomp_pandas_1890 into 300d997 on statsmodels:master.

@josef-pkt josef-pkt BUG: work with bytes, use dtype object in pandas.Series
b83f6f2
@josef-pkt
Member

related to py 3 failure

we are working with bytes because that's what we got with recfromtext.
It works correctly, however the summary has the repr of the bytes labels

(Pdb) p print(self.res.summary().as_text())
  Multiple Comparison of Means - Tukey HSD,FWER=0.05
=====================================================
  group1      group2   meandiff  lower  upper  reject
-----------------------------------------------------
b'medical'  b'mental'    1.5     0.3217 2.6783  True
b'medical' b'physical'   1.0    -0.1783 2.1783 False
b'mental'  b'physical'   -0.5   -1.6783 0.6783 False
-----------------------------------------------------

This means that if we want to add a unittest with string comparison for summary, then we have different strings/text in python 2 and python 3 if labels are not strings.

@josef-pkt
Member

all green, merging

@josef-pkt josef-pkt merged commit ab79a47 into statsmodels:master Aug 16, 2014

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci The Travis CI build passed
Details
@coveralls

Coverage Status

Coverage increased (+0.0%) when pulling b83f6f2 on josef-pkt:BUG_multicomp_pandas_1890 into 300d997 on statsmodels:master.

@josef-pkt josef-pkt deleted the josef-pkt:BUG_multicomp_pandas_1890 branch Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment