import pandas
import numpy as np

from scikits.statsmodels.tools import data

def test_missing_data_pandas():
    """
    Fixes GH: #144
    """
    X = np.random.random((10,5))
    X[1,2] = np.nan
    df = pandas.DataFrame(X)
    vals, cnames, rnames = data.interpret_data(df)
    np.testing.assert_equal(rnames, [0,2,3,4,5,6,7,8,9])

@@ -328,8 +328,1079 @@
 7,8,9%5D)%0A
+%0Adef test_structarray():%0A    X = np.random.random((10,)).astype(%5B('var1', 'f8'),%0A                                        ('var2', 'f8'),%0A                                        ('var3', 'f8')%5D)%0A    vals, cnames, rnames = data.interpret_data(X)%0A    np.testing.assert_equal(cnames, X.dtype.names)%0A    np.testing.assert_equal(vals, X.view((float,3)))%0A    np.testing.assert_equal(rnames, None)%0A%0Adef test_recarray():%0A    X = np.random.random((10,)).astype(%5B('var1', 'f8'),%0A                                        ('var2', 'f8'),%0A                                        ('var3', 'f8')%5D)%0A    vals, cnames, rnames = data.interpret_data(X.view(np.recarray))%0A    np.testing.assert_equal(cnames, X.dtype.names)%0A    np.testing.assert_equal(vals, X.view((float,3)))%0A    np.testing.assert_equal(rnames, None)%0A%0A%0Adef test_dataframe():%0A    X = np.random.random((10,5))%0A    df = pandas.DataFrame(X)%0A    vals, cnames, rnames = data.interpret_data(df)%0A    np.testing.assert_equal(vals, df.values)%0A    np.testing.assert_equal(rnames, df.index)%0A    np.testing.assert_equal(cnames, df.columns)%0A

Add some tests for unused function