class_docstr: Data handling class which knows how to reattach pandas metadata to model
  results
class_docstr_tok: ["Data","handling","class","which","knows","how","to","reattach","pandas","metadata","to","model","results"]
code: def _convert_endog_exog(self, endog, exog=None):
      # TODO: remove this when we handle dtype systematically
      endog = np.asarray(endog)
      exog = exog if exog is None else np.asarray(exog)
      if (
          endog.dtype == object
          or exog is not None
          and exog.dtype == object
      ):
          raise ValueError(
              "Pandas data cast to numpy dtype of object. "
              "Check input data with np.asarray(data)."
          )
      return super()._convert_endog_exog(endog, exog)
  
imports: from __future__ import annotations
  from statsmodels.compat.python import lmap
  from functools import reduce
  import numpy
  from pandas import DataFrame, Series, isnull, MultiIndex
  import statsmodels.tools.data
  from statsmodels.tools.decorators import cache_readonly, cache_writable
  from statsmodels.tools.sm_exceptions import MissingDataError
label_desc: Use image node_id 1 for calling the PandasData obj's underlying member method code with example usage: obj._convert_endog_exog(endog, exog) and returns: super