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 attach_rows(self, result):
      # assumes if len(row_labels) > len(result) it's bc it was truncated
      # at the front, for AR lags, for example
      squeezed = result.squeeze()
      k_endog = np.array(self.ynames, ndmin=1).shape[0]
      if k_endog > 1 and squeezed.shape == (k_endog,):
          squeezed = squeezed[None, :]
      # May be zero-dim, for example in the case of forecast one step in tsa
      if squeezed.ndim < 2:
          out = Series(squeezed)
      else:
          out = DataFrame(result)
          out.columns = self.ynames
      out.index = self.row_labels[-len(result) :]
      return out
  
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 12 for calling the PandasData obj's underlying member method code with example usage: obj.attach_rows(result) and returns: out