code: def test_nan(self):
      # Issue #11981
  
      formatter = EngFormatter(accuracy=1, use_eng_prefix=True)
      result = formatter(np.nan)
      assert result == "NaN"
  
      df = DataFrame(
          {
              "a": [1.5, 10.3, 20.5],
              "b": [50.3, 60.67, 70.12],
              "c": [100.2, 101.33, 120.33],
          }
      )
      pt = df.pivot_table(values="a", index="b", columns="c")
      set_eng_float_format(accuracy=1)
      result = pt.to_string()
      assert "NaN" in result
  
file_path: pandas/pandas/tests/io/formats/test_eng_formatting.py
imports: import numpy
  import pytest
  from pandas import DataFrame, reset_option, set_eng_float_format
  from pandas.io.formats.format import EngFormatter
label_desc: Use image node_id 8 for calling the TestEngFormatter obj's underlying member method code with example usage: obj.test_nan() without return types