<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def doc(self):
 """ Formats a table of documentation strings to help users remember variable names, and understand how they are translated into python safe names. Returns ------- docs_df: pandas dataframe Dataframe with columns for the model components: - Real names - Python safe identifiers (as used in model.components) - Units string - Documentation strings from the original model file """

        collector = []
        for name, varname in self.components._namespace.items():
            try:
                docstring = getattr(self.components, varname).__doc__
                lines = docstring.split('\n')
                collector.append({'Real Name': name,
                                  'Py Name': varname,
                                  'Eqn': lines[2].replace("Original Eqn:", "").strip(),
                                  'Unit': lines[3].replace("Units:", "").strip(),
                                  'Lims': lines[4].replace("Limits:", "").strip(),
                                  'Type': lines[5].replace("Type:", "").strip(),
                                  'Comment': '\n'.join(lines[7:]).strip()})
            except:
                pass

        docs_df = _pd.DataFrame(collector)
        docs_df.fillna('None', inplace=True)

        order = ['Real Name', 'Py Name', 'Unit', 'Lims', 'Type', 'Eqn', 'Comment']
        return docs_df[order].sort_values(by='Real Name').reset_index(drop=True)