code: def test_sparse_dataframe(self):
      expected = pandas.DataFrame()
      expected["sparse_int"] = [
          i if i % 2 == 0 else None for i in range(10)
      ]
      expected["sparse_float"] = [
          float(i) if i % 2 == 1 else None for i in range(10)
      ]
      expected["sparse_str"] = [
          str(i) if i % 3 == 0 else None for i in range(10)
      ]
      expected["sparse_array"] = [
          array.array("d", [i]) if i % 5 == 0 else None
          for i in range(10)
      ]
      expected["sparse_list"] = [
          [str(i)] if i % 7 == 0 else None for i in range(10)
      ]
      assert_frame_equal(SFrame(expected).to_dataframe(), expected)
  
file_path: turicreate/src/python/turicreate/test/test_dataframe.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import pandas
  import array
  from ..None import SFrame
  from pandas.util.testing import assert_frame_equal
  from sys import version_info
  import pytest
label_desc: Use image node_id 3 for calling the DataFrameTest obj's underlying member method code with example usage: obj.test_sparse_dataframe() without return types