def merge_all_rows_to_one(instance, value_separator_pattern=' | '):
    '\n        >>> my_listdata = ListData().append_row([\'john\', 2054]).append_row([\'john\', 3254])\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'john\', \'2054 | 3254\']\n\n        >>> my_listdata = ListData()\n        >>> my_listdata.dataset = [[\'john\', 2054], [\'john\', 3254], [\'john\', 2672]]\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'john\', \'2054 | 3254 | 2672\']\n\n        # method does not deal with headers\n        >>> my_listdata.dataset = [[\'name\', \'birth_date\'], [\'john\', 2084], [\'john\', 2054]]\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'name | john\', \'birth_date | 2084 | 2054\']\n\n        # but headers can be easily managed\n        >>> my_listdata.dataset = [[\'name\', \'birth_date\'], [\'john\', 2084], [\'john\', 2054]]\n        >>> my_listdata.dataset = my_listdata.dataset[1:]\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'john\', \'2084 | 2054\']\n\n        # different separator pattern (and a transpose-like operation)\n        >>> my_listdata.dataset = [[\'name\', \'birth_date\'], [\'john\', 2084], [\'john\', 2054], [\'jane\', 2054]]\n        >>> my_listdata.merge_all_rows_to_one(\'; \').dataset\n        [\'name; john; jane\', \'birth_date; 2084; 2054\']\n\n        >>> type(my_listdata.dataset)\n        <class \'list\'>\n\n        >>> from preprocessor.csv_tools import CSV_Line, CSV_Row, Row_Merge_Buffer\n        >>> line_1 = CSV_Line(\' "Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "Steer - Robert A." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "10.1037//0022-006x.56.6.893" ,\')\n        >>> line_2 = CSV_Line(\' "Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "John - Doe B." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "https://doi.org/10.1037//0022-006x.56.6.893" ,\')\n        >>> line_1.clean_head_and_tail_from_patterns(\' ,\', location=\'tail\').clean_head_and_tail_from_patterns(\' \', location=\'head\')\n        \'"Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "Steer - Robert A." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "10.1037//0022-006x.56.6.893"\'\n        >>> line_2.clean_head_and_tail_from_patterns(\' ,\', location=\'tail\').clean_head_and_tail_from_patterns(\' \', location=\'head\')\n        \'"Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "John - Doe B." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "https://doi.org/10.1037//0022-006x.56.6.893"\'\n        >>> row_1 = line_1.parse_line_and_CONVERT_to_CSV_Row(\' , \').clean_cell_heads_and_tails_from_characters(\'"\')\n        >>> row_2 = line_2.parse_line_and_CONVERT_to_CSV_Row(\' , \').clean_cell_heads_and_tails_from_characters(\'"\')\n        >>> buffer = Row_Merge_Buffer(1)\n        >>> buffer.append_as_first_row_and_reset_buffer(row_1)\n        "https://w3id.org/oc/corpus/br/45174: [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\']]"\n        >>> buffer.append_row_if_ids_match(row_2)\n        "https://w3id.org/oc/corpus/br/45174: [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\'], [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'https://doi.org/10.1037//0022-006x.56.6.893\']]"\n        >>> buffer.merge_all_rows_to_one(\' | \')\n        "https://w3id.org/oc/corpus/br/45174: [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A. | John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893\']"\n\n        # List conversion with actual rows\n        >>> a = ListData()\n        >>> a.dataset = [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\'], [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'https://doi.org/10.1037//0022-006x.56.6.893\']]\n        >>> a.merge_all_rows_to_one(\' | \').dataset\n        [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A. | John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893\']\n\n        # Row_Merge_Buffer class conversion with actual rows\n        >>> a = Row_Merge_Buffer(1)\n        >>> a.dataset = [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\'], [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'https://doi.org/10.1037//0022-006x.56.6.893\']]\n        >>> a.merge_all_rows_to_one(\' | \').dataset\n        [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A. | John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893\']\n\n        # Error from empty dataset\n        >>> a = ListData()\n        >>>\n        >>> try:\n        ...     a.merge_all_rows_to_one(\' | \') #  no item to index in empty dataset\n        ... except Exception as error_message:\n        ...     print(\'Exception: \' + str(error_message))\n        Exception: Dataset to be merged is either empty or not indexable (no item at index [0]).\n        The input dataset is:\n        []\n        '
    try:
        instance.dataset[0]
    except IndexError:
        raise IndexError(('Dataset to be merged is either empty or not indexable (no item at index [0]).\nThe input dataset is:\n%s' % str(instance.dataset)))
    dataset = instance.dataset
    merged_row = dataset[0]
    for each_row in dataset:
        current_row = each_row
        current_cell_position = 0
        for (each_current_cell, each_merged_cell) in zip(current_row, merged_row):
            if (str(each_current_cell) not in str(each_merged_cell)):
                merged_cell = ((str(each_merged_cell) + value_separator_pattern) + str(each_current_cell))
                merged_row[current_cell_position] = merged_cell
            current_cell_position += 1
    instance.dataset = merged_row
    return instance
>>> my_listdata = ListData().append_row(['john', 2054]).append_row(['john', 3254])
>>> my_listdata.merge_all_rows_to_one().dataset
['john', '2054 | 3254']

>>> my_listdata = ListData()
>>> my_listdata.dataset = [['john', 2054], ['john', 3254], ['john', 2672]]
>>> my_listdata.merge_all_rows_to_one().dataset
['john', '2054 | 3254 | 2672']

# method does not deal with headers
>>> my_listdata.dataset = [['name', 'birth_date'], ['john', 2084], ['john', 2054]]
>>> my_listdata.merge_all_rows_to_one().dataset
['name | john', 'birth_date | 2084 | 2054']

# but headers can be easily managed
>>> my_listdata.dataset = [['name', 'birth_date'], ['john', 2084], ['john', 2054]]
>>> my_listdata.dataset = my_listdata.dataset[1:]
>>> my_listdata.merge_all_rows_to_one().dataset
['john', '2084 | 2054']

# different separator pattern (and a transpose-like operation)
>>> my_listdata.dataset = [['name', 'birth_date'], ['john', 2084], ['john', 2054], ['jane', 2054]]
>>> my_listdata.merge_all_rows_to_one('; ').dataset
['name; john; jane', 'birth_date; 2084; 2054']

>>> type(my_listdata.dataset)
<class 'list'>

>>> from preprocessor.csv_tools import CSV_Line, CSV_Row, Row_Merge_Buffer
>>> line_1 = CSV_Line(' "Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "Steer - Robert A." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "10.1037//0022-006x.56.6.893" ,')
>>> line_2 = CSV_Line(' "Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "John - Doe B." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "https://doi.org/10.1037//0022-006x.56.6.893" ,')
>>> line_1.clean_head_and_tail_from_patterns(' ,', location='tail').clean_head_and_tail_from_patterns(' ', location='head')
'"Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "Steer - Robert A." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "10.1037//0022-006x.56.6.893"'
>>> line_2.clean_head_and_tail_from_patterns(' ,', location='tail').clean_head_and_tail_from_patterns(' ', location='head')
'"Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "John - Doe B." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "https://doi.org/10.1037//0022-006x.56.6.893"'
>>> row_1 = line_1.parse_line_and_CONVERT_to_CSV_Row(' , ').clean_cell_heads_and_tails_from_characters('"')
>>> row_2 = line_2.parse_line_and_CONVERT_to_CSV_Row(' , ').clean_cell_heads_and_tails_from_characters('"')
>>> buffer = Row_Merge_Buffer(1)
>>> buffer.append_as_first_row_and_reset_buffer(row_1)
"https://w3id.org/oc/corpus/br/45174: [['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893']]"
>>> buffer.append_row_if_ids_match(row_2)
"https://w3id.org/oc/corpus/br/45174: [['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893'], ['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'John - Doe B.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', 'https://doi.org/10.1037//0022-006x.56.6.893']]"
>>> buffer.merge_all_rows_to_one(' | ')
"https://w3id.org/oc/corpus/br/45174: ['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A. | John - Doe B.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893']"

# List conversion with actual rows
>>> a = ListData()
>>> a.dataset = [['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893'], ['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'John - Doe B.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', 'https://doi.org/10.1037//0022-006x.56.6.893']]
>>> a.merge_all_rows_to_one(' | ').dataset
['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A. | John - Doe B.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893']

# Row_Merge_Buffer class conversion with actual rows
>>> a = Row_Merge_Buffer(1)
>>> a.dataset = [['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893'], ['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'John - Doe B.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', 'https://doi.org/10.1037//0022-006x.56.6.893']]
>>> a.merge_all_rows_to_one(' | ').dataset
['Journal Article', 'https://w3id.org/oc/corpus/br/45174', 'An inventory for measuring clinical anxiety: Psychometric properties.', '1988', 'Steer - Robert A. | John - Doe B.', 'Journal of Consulting and Clinical Psychology', '6', '56', '893--897', 'American Psychological Association (APA)', '10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893']

# Error from empty dataset
>>> a = ListData()
>>>
>>> try:
...     a.merge_all_rows_to_one(' | ') #  no item to index in empty dataset
... except Exception as error_message:
...     print('Exception: ' + str(error_message))
Exception: Dataset to be merged is either empty or not indexable (no item at index [0]).
The input dataset is:
[]
def merge_all_rows_to_one(instance, value_separator_pattern=' | '):
    '\n        >>> my_listdata = ListData().append_row([\'john\', 2054]).append_row([\'john\', 3254])\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'john\', \'2054 | 3254\']\n\n        >>> my_listdata = ListData()\n        >>> my_listdata.dataset = [[\'john\', 2054], [\'john\', 3254], [\'john\', 2672]]\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'john\', \'2054 | 3254 | 2672\']\n\n        # method does not deal with headers\n        >>> my_listdata.dataset = [[\'name\', \'birth_date\'], [\'john\', 2084], [\'john\', 2054]]\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'name | john\', \'birth_date | 2084 | 2054\']\n\n        # but headers can be easily managed\n        >>> my_listdata.dataset = [[\'name\', \'birth_date\'], [\'john\', 2084], [\'john\', 2054]]\n        >>> my_listdata.dataset = my_listdata.dataset[1:]\n        >>> my_listdata.merge_all_rows_to_one().dataset\n        [\'john\', \'2084 | 2054\']\n\n        # different separator pattern (and a transpose-like operation)\n        >>> my_listdata.dataset = [[\'name\', \'birth_date\'], [\'john\', 2084], [\'john\', 2054], [\'jane\', 2054]]\n        >>> my_listdata.merge_all_rows_to_one(\'; \').dataset\n        [\'name; john; jane\', \'birth_date; 2084; 2054\']\n\n        >>> type(my_listdata.dataset)\n        <class \'list\'>\n\n        >>> from preprocessor.csv_tools import CSV_Line, CSV_Row, Row_Merge_Buffer\n        >>> line_1 = CSV_Line(\' "Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "Steer - Robert A." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "10.1037//0022-006x.56.6.893" ,\')\n        >>> line_2 = CSV_Line(\' "Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "John - Doe B." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "https://doi.org/10.1037//0022-006x.56.6.893" ,\')\n        >>> line_1.clean_head_and_tail_from_patterns(\' ,\', location=\'tail\').clean_head_and_tail_from_patterns(\' \', location=\'head\')\n        \'"Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "Steer - Robert A." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "10.1037//0022-006x.56.6.893"\'\n        >>> line_2.clean_head_and_tail_from_patterns(\' ,\', location=\'tail\').clean_head_and_tail_from_patterns(\' \', location=\'head\')\n        \'"Journal Article" , "https://w3id.org/oc/corpus/br/45174" , "An inventory for measuring clinical anxiety: Psychometric properties." , "1988" , "John - Doe B." , "Journal of Consulting and Clinical Psychology" , "6" , "56" , "893--897" , "American Psychological Association (APA)" , "https://doi.org/10.1037//0022-006x.56.6.893"\'\n        >>> row_1 = line_1.parse_line_and_CONVERT_to_CSV_Row(\' , \').clean_cell_heads_and_tails_from_characters(\'"\')\n        >>> row_2 = line_2.parse_line_and_CONVERT_to_CSV_Row(\' , \').clean_cell_heads_and_tails_from_characters(\'"\')\n        >>> buffer = Row_Merge_Buffer(1)\n        >>> buffer.append_as_first_row_and_reset_buffer(row_1)\n        "https://w3id.org/oc/corpus/br/45174: [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\']]"\n        >>> buffer.append_row_if_ids_match(row_2)\n        "https://w3id.org/oc/corpus/br/45174: [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\'], [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'https://doi.org/10.1037//0022-006x.56.6.893\']]"\n        >>> buffer.merge_all_rows_to_one(\' | \')\n        "https://w3id.org/oc/corpus/br/45174: [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A. | John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893\']"\n\n        # List conversion with actual rows\n        >>> a = ListData()\n        >>> a.dataset = [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\'], [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'https://doi.org/10.1037//0022-006x.56.6.893\']]\n        >>> a.merge_all_rows_to_one(\' | \').dataset\n        [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A. | John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893\']\n\n        # Row_Merge_Buffer class conversion with actual rows\n        >>> a = Row_Merge_Buffer(1)\n        >>> a.dataset = [[\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893\'], [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'https://doi.org/10.1037//0022-006x.56.6.893\']]\n        >>> a.merge_all_rows_to_one(\' | \').dataset\n        [\'Journal Article\', \'https://w3id.org/oc/corpus/br/45174\', \'An inventory for measuring clinical anxiety: Psychometric properties.\', \'1988\', \'Steer - Robert A. | John - Doe B.\', \'Journal of Consulting and Clinical Psychology\', \'6\', \'56\', \'893--897\', \'American Psychological Association (APA)\', \'10.1037//0022-006x.56.6.893 | https://doi.org/10.1037//0022-006x.56.6.893\']\n\n        # Error from empty dataset\n        >>> a = ListData()\n        >>>\n        >>> try:\n        ...     a.merge_all_rows_to_one(\' | \') #  no item to index in empty dataset\n        ... except Exception as error_message:\n        ...     print(\'Exception: \' + str(error_message))\n        Exception: Dataset to be merged is either empty or not indexable (no item at index [0]).\n        The input dataset is:\n        []\n        '
    try:
        instance.dataset[0]
    except IndexError:
        raise IndexError(('Dataset to be merged is either empty or not indexable (no item at index [0]).\nThe input dataset is:\n%s' % str(instance.dataset)))
    dataset = instance.dataset
    merged_row = dataset[0]
    for each_row in dataset:
        current_row = each_row
        current_cell_position = 0
        for (each_current_cell, each_merged_cell) in zip(current_row, merged_row):
            if (str(each_current_cell) not in str(each_merged_cell)):
                merged_cell = ((str(each_merged_cell) + value_separator_pattern) + str(each_current_cell))
                merged_row[current_cell_position] = merged_cell
            current_cell_position += 1
    instance.dataset = merged_row
    return instance