class_docstr: ArrowIOTensorTest
class_docstr_tok: ["ArrowIOTensorTest"]
docstr: test_spec_selection_by_column_index
code: def test_spec_selection_by_column_index(self):
      """test_spec_selection_by_column_index"""
  
      def from_func(_):
          a = pa.array([1, 2, 3], type=pa.int32())
          b = pa.array([4, 5, 6], type=pa.int64())
          c = pa.array([7, 8, 9], type=pa.float32())
          t = pa.Table.from_arrays([a, b, c], ["a", "b", "c"])
          foo = tfio.IOTensor.from_arrow(t, spec={1: tf.int64})
          return foo(1).to_tensor()
  
      ds = tf.data.Dataset.range(1).map(from_func)
      results = list(ds.as_numpy_iterator())
      self.assertEqual(len(results), 1)
      result = results[0]
  
      b = pa.array([4, 5, 6], type=pa.int64())
      expected = b.to_numpy()
  
      npt.assert_array_equal(result, expected)
  
imports: from collections import namedtuple
  import io
  import os
  import socket
  import tempfile
  import threading
  import pytest
  import pyarrow
  import numpy.testing
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 11 for calling the ArrowIOTensorTest obj's underlying member method code with example usage: obj.test_spec_selection_by_column_index() and returns: foo