(pandas_name)
return reformat('\n\n'.join(examples))
Get list of examples for Pandas object.

    :param pandas_name: Pandas object for which documentation to be generated.
    :return: Generated docstring.
Get list of examples for Pandas object.
Get list of examples for Pandas object .
def get_obj_examples(pandas_name):
    """
    Get list of examples for Pandas object.

    :param pandas_name: Pandas object for which documentation to be generated.
    :return: Generated docstring.
    """
    sdc_obj = get_sdc_object_by_pandas_name(pandas_name)
    sdc_doc = get_docstring(sdc_obj)
    sections = split_in_sections(reindent(sdc_doc, 0))
    sections_as_dict = {title.strip(): text for title, text in sections}
    example_section = sections_as_dict.get('Examples')
    if not example_section:
        return None

    examples = []
    section_names = ['literalinclude', 'command-output']
    for subsection in example_section.strip().split('\n\n'):
        subsection = subsection.strip()
        if any(subsection.startswith(f'.. {name}') for name in section_names):
            # remove a directory level from path to examples
            examples.append(subsection.replace(' ../', ' '))

    return reformat('\n\n'.join(examples))
def get_obj_examples ( pandas_name ) : sdc_obj = get_sdc_object_by_pandas_name ( pandas_name ) sdc_doc = get_docstring ( sdc_obj ) sections = split_in_sections ( reindent ( sdc_doc , 0 ) ) sections_as_dict = { title . strip ( ) : text for title , text in sections } example_section = sections_as_dict . get ( 'Examples' ) if not example_section : return None examples = [ ] section_names = [ 'literalinclude' , 'command-output' ] for subsection in example_section . strip ( ) . split ( '\n\n' ) : subsection = subsection . strip ( ) if any ( subsection . startswith ( f'.. {name}' ) for name in section_names ) : # remove a directory level from path to examples examples . append ( subsection . replace ( ' ../' , ' ' ) ) return reformat ( '\n\n' . join ( examples ) )