Ejemplo n.º 1
0
 def test_parse_data(self):
     buf = pa.py_buffer(data_data)
     schema = pa.schema([
         pa.field("depdelay", pa.int16()),
         pa.field("arrdelay", pa.int16())
     ])
     result = _load_data(buf, schema)
     expected = pd.DataFrame({
         "depdelay": depdelay,
         "arrdelay": arrdelay,
     })[['depdelay', 'arrdelay']]
     tm.assert_frame_equal(result, expected)
Ejemplo n.º 2
0
 def test_parse_data(self):
     buf = pa.frombuffer(data_data)
     schema = pa.schema([
         pa.field("depdelay", pa.int16()),
         pa.field("arrdelay", pa.int16())
     ])
     result = _load_data(buf, schema)
     expected = pd.DataFrame({
         "depdelay": np.array([1, 12, 17, -4, 30, 10, 30, 12, 3, -3],
                              dtype=np.int16),
         "arrdelay": np.array([-2, 4, 29, -12, 11, -2, 10, -3, -11, -13],
                              dtype=np.int16)
     })[['depdelay', 'arrdelay']]
     tm.assert_frame_equal(result, expected)