class_docstr: Tests for ExtensionArray.__getitem__.
code: def test_iloc_frame(self, data):
      df = pd.DataFrame(
          {"A": data, "B": np.arange(len(data), dtype="int64")}
      )
      expected = pd.DataFrame({"A": data[:4]})
  
      # slice -> frame
      result = df.iloc[:4, [0]]
      tm.assert_frame_equal(result, expected)
  
      # sequence -> frame
      result = df.iloc[[0, 1, 2, 3], [0]]
      tm.assert_frame_equal(result, expected)
  
      expected = pd.Series(data[:4], name="A")
  
      # slice -> series
      result = df.iloc[:4, 0]
      tm.assert_series_equal(result, expected)
  
      # sequence -> series
      result = df.iloc[:4, 0]
      tm.assert_series_equal(result, expected)
  
      # GH#32959 slice columns with step
      result = df.iloc[:, ::2]
      tm.assert_frame_equal(result, df[["A"]])
      result = df[["B", "A"]].iloc[:, ::2]
      tm.assert_frame_equal(result, df[["B"]])
  
imports: import numpy
  import pytest
  import pandas
  import pandas._testing
label_desc: Use image node_id 2 for calling the BaseGetitemTests obj's underlying member method code with example usage: obj.test_iloc_frame(data) without return types