class_docstr: Wrap array_like using the index from the original input, if pandas
  
  Parameters
  ----------
  pandas_obj : {Series, DataFrame}
      Object to extract the index from for wrapping
  
  Notes
  -----
  Raises if ``orig`` is a pandas type but obj and and ``orig`` have
  different numbers of elements in axis 0. Also raises if the ndim of obj
  is larger than 2.
class_docstr_tok: ["Wrap","array_like","using","the","index","from","the","original","input",",","if","pandas","Parameters","--","--","--","--","--","pandas_obj",":","{","Series",",","DataFrame","}","Object","to","extract","the","index","from","for","wrapping","Notes","--","--","-","Raises","if","``","orig","``","is","a","pandas","type","but","obj","and","and","``","orig","``","have","different","numbers","of","elements","in","axis","0",".","Also","raises","if","the","ndim","of","obj","is","larger","than","2","."]
code: def __init__(self, pandas_obj):
      self._pandas_obj = pandas_obj
      self._is_pandas = isinstance(
          pandas_obj, (pd.Series, pd.DataFrame)
      )
  
file_path: statsmodels/statsmodels/tools/validation/validation.py
imports: from typing import Any, Optional
  from collections.abc import Mapping
  import numpy
  import pandas
label_desc: Use image node_id 1 to create a new PandasWrapper object  with example: obj = PandasWrapper(pandas_obj)