code: def var_to_df(self):
          
          ret = {}
          self._check_pd()
  
          if self._flags['address'] is False:
              return pd.DataFrame.from_dict(ret)
  
          ret.update({'name': self.name})
          ret.update({'idx': self.idx})
  
          for x in self._states:
              idx = self.__dict__[x]
              ret.update({x: self.system.dae.x[idx]})
          for y in self._algebs:
              idx = self.__dict__[y]
              ret.update({y: self.system.dae.y[idx]})
  
          var_df = pd.DataFrame.from_dict(ret).set_index('idx')
  
          return var_df
docs: Return the current var_to_df of variables
  
          :return: pandas.DataFrame