Ejemplo n.º 1
0
def test_string_format():
    arr = pa.array([u'', None, u'foo'])
    result = fmt.array_format(arr)
    expected = """\
[
  "",
  null,
  "foo"
]"""
    assert result == expected
Ejemplo n.º 2
0
    def test_string_format(self):
        arr = pyarrow.from_pylist(['', None, 'foo'])
        result = fmt.array_format(arr)
        expected = """\
[
  '',
  NA,
  'foo'
]"""
        assert result == expected
Ejemplo n.º 3
0
def test_string_format():
    arr = pyarrow.from_pylist(['', None, 'foo'])
    result = fmt.array_format(arr)
    expected = """\
[
  '',
  NA,
  'foo'
]"""
    assert result == expected
Ejemplo n.º 4
0
def test_string_format():
    arr = pa.array(['', None, 'foo'])
    result = fmt.array_format(arr)
    expected = """\
[
  '',
  NA,
  'foo'
]"""
    assert result == expected
Ejemplo n.º 5
0
def test_string_format():
    arr = pa.array(['', None, 'foo'])
    result = fmt.array_format(arr)
    expected = """\
[
  '',
  NA,
  'foo'
]"""
    assert result == expected
Ejemplo n.º 6
0
def test_string_format():
    arr = pa.array([u'', None, u'foo'])
    result = fmt.array_format(arr)
    expected = """\
[
  "",
  null,
  "foo"
]"""
    assert result == expected
Ejemplo n.º 7
0
    def test_list_format(self):
        arr = pyarrow.from_pylist([[1], None, [2, 3]])
        result = fmt.array_format(arr)
        expected = """\
[
  [1],
  NA,
  [2,
   3]
]"""
        assert result == expected
Ejemplo n.º 8
0
    def test_list_format(self):
        arr = pyarrow.from_pylist([[1], None, [2, 3]])
        result = fmt.array_format(arr)
        expected = """\
[
  [1],
  NA,
  [2,
   3]
]"""
        assert result == expected
Ejemplo n.º 9
0
def test_long_array_format():
    arr = pa.array(range(100))
    result = fmt.array_format(arr, window=2)
    expected = """\
[
  0,
  1,
  ...
  98,
  99
]"""
    assert result == expected
Ejemplo n.º 10
0
    def test_long_array_format(self):
        arr = pyarrow.from_pylist(range(100))
        result = fmt.array_format(arr, window=2)
        expected = """\
[
  0,
  1,
  ...
  98,
  99
]"""
        assert result == expected
Ejemplo n.º 11
0
def test_list_format():
    arr = pa.array([[1], None, [2, 3, None]])
    result = fmt.array_format(arr)
    expected = """\
[
  [1],
  NA,
  [2,
   3,
   NA]
]"""
    assert result == expected
Ejemplo n.º 12
0
def test_list_format():
    arr = pa.from_pylist([[1], None, [2, 3, None]])
    result = fmt.array_format(arr)
    expected = """\
[
  [1],
  NA,
  [2,
   3,
   NA]
]"""
    assert result == expected
Ejemplo n.º 13
0
    def test_long_array_format(self):
        arr = pyarrow.from_pylist(range(100))
        result = fmt.array_format(arr, window=2)
        expected = """\
[
  0,
  1,
  ...
  98,
  99
]"""
        assert result == expected
Ejemplo n.º 14
0
def test_long_array_format():
    arr = pa.array(range(100))
    result = fmt.array_format(arr, window=2)
    expected = """\
[
  0,
  1,
  ...
  98,
  99
]"""
    assert result == expected
Ejemplo n.º 15
0
def test_list_format():
    arr = pa.array([[1], None, [2, 3, None]])
    result = fmt.array_format(arr)
    expected = """\
[
  [
    1
  ],
  null,
  [
    2,
    3,
    null
  ]
]"""
    assert result == expected