def test_from_csv(self): df = pd.read_csv(grunfeld) pan = RDataFrame.from_csv(grunfeld, i='FIRM', t='YEAR') for d, p in zip(list(pan.index), zip(list(df['FIRM']), list(df['YEAR']))): self.assertEqual(d[0], p[0]) self.assertEqual(d[1], p[1])
def test_keep_index(self): pan = RDataFrame.from_csv(grunfeld, i='FIRM', t='YEAR', keep_index=False) self.assertNotIn('FIRM', pan.columns)
def setup_rdf(self): rdf = RDataFrame.from_csv(grunfeld) return rdf