code: def test_sanitize_nullable_integers():
      df = pd.DataFrame(
          {
              "int_np": [1, 2, 3, 4, 5],
              "int64": pd.Series([1, 2, 3, None, 5], dtype="UInt8"),
              "int64_nan": pd.Series(
                  [1, 2, 3, float("nan"), 5], dtype="Int64"
              ),
              "float": [1.0, 2.0, 3.0, 4, 5.0],
              "float_null": [1, 2, None, 4, 5],
              "float_inf": [1, 2, None, 4, (float("inf"))],
          }
      )
  
      df_clean = sanitize_dataframe(df)
      assert {col.dtype.name for _, col in df_clean.items()} == {
          "object"
      }
  
      result_python = {
          col_name: list(col) for col_name, col in df_clean.items()
      }
      assert result_python == {
          "int_np": [1, 2, 3, 4, 5],
          "int64": [1, 2, 3, None, 5],
          "int64_nan": [1, 2, 3, None, 5],
          "float": [1.0, 2.0, 3.0, 4.0, 5.0],
          "float_null": [1.0, 2.0, None, 4.0, 5.0],
          "float_inf": [1.0, 2.0, None, 4.0, None],
      }
  
file_path: altair/tests/utils/test_utils.py
imports: import io
  import json
  import warnings
  import numpy
  import pandas
  import pytest
  from altair.utils import infer_vegalite_type, sanitize_dataframe
label_desc: Use image node_id 7 for calling a global function with example usage: test_sanitize_nullable_integers() without return types