예제 #1
0
 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])
예제 #2
0
 def test_keep_index(self):
     pan = RDataFrame.from_csv(grunfeld, i='FIRM', t='YEAR', keep_index=False)
     self.assertNotIn('FIRM', pan.columns)
예제 #3
0
 def setup_rdf(self):
     rdf = RDataFrame.from_csv(grunfeld)
     return rdf