code: def test_issue397():
      # Note: warnings are expected with np.inf values
      df = pd.DataFrame.from_dict(
          {
              "float-inf": pd.Series(
                  [np.inf, 3.0, 4.0, np.NINF], dtype="float"
              ),
              "integer": pd.Series([3, 4, 5, 6], dtype="int"),
              "float": pd.Series([3.0, 4.0, np.nan, 6], dtype="float"),
              "integer-inf": pd.Series([3, np.inf, 5, 7]),
              "cat": ["Foo", "Bar", "Great", "Var"],
          }
      )
  
      report = ydata_profiling.ProfileReport(
          df, vars={"num": {"low_categorical_threshold": 0}}
      )
      assert report.config.vars.num.low_categorical_threshold == 0
  
      description = report.description_set
  
      assert description.table["types"] == {"Text": 1, "Numeric": 4}
  
      assert description.variables["float-inf"]["p_infinite"] == 0.5
      assert description.variables["float-inf"]["n_infinite"] == 2
  
      assert description.variables["integer-inf"]["p_infinite"] == 0.25
      assert description.variables["integer-inf"]["n_infinite"] == 1
  
      assert description.variables["integer"]["p_infinite"] == 0
      assert description.variables["integer"]["n_infinite"] == 0
  
      assert description.variables["float"]["p_infinite"] == 0
      assert description.variables["float"]["n_infinite"] == 0
  
      assert "p_infinite" not in description.variables["cat"]
      assert "n_infinite" not in description.variables["cat"]
  
imports: import numpy
  import pandas
  import ydata_profiling
label_desc: Use image node_id 1 for calling a global function with example usage: test_issue397() without return types