def transpose_dataset(instance):
    "\n\n        >>> my_listdata = ListData()\n        >>> my_listdata.dataset = [['name', 'birth_date'], ['john', 2084], ['jane', 2054]]\n        >>> my_listdata.transpose_dataset().dataset\n        [['name', 'john', 'jane'], ['birth_date', 2084, 2054]]\n        >>> my_listdata.transpose_dataset().dataset\n        [['name', 'birth_date'], ['john', 2084], ['jane', 2054]]\n\n        >>> my_listdata.transpose_dataset().dataset == my_listdata.transpose_dataset().transpose_dataset().dataset\n        True\n        "
    row_length = instance.get_row_length()
    columns = [instance.get_column_at_index(i) for i in range(0, row_length)]
    instance.dataset = columns
    return instance
>>> my_listdata = ListData()
>>> my_listdata.dataset = [['name', 'birth_date'], ['john', 2084], ['jane', 2054]]
>>> my_listdata.transpose_dataset().dataset
[['name', 'john', 'jane'], ['birth_date', 2084, 2054]]
>>> my_listdata.transpose_dataset().dataset
[['name', 'birth_date'], ['john', 2084], ['jane', 2054]]

>>> my_listdata.transpose_dataset().dataset == my_listdata.transpose_dataset().transpose_dataset().dataset
True
def transpose_dataset(instance):
    "\n\n        >>> my_listdata = ListData()\n        >>> my_listdata.dataset = [['name', 'birth_date'], ['john', 2084], ['jane', 2054]]\n        >>> my_listdata.transpose_dataset().dataset\n        [['name', 'john', 'jane'], ['birth_date', 2084, 2054]]\n        >>> my_listdata.transpose_dataset().dataset\n        [['name', 'birth_date'], ['john', 2084], ['jane', 2054]]\n\n        >>> my_listdata.transpose_dataset().dataset == my_listdata.transpose_dataset().transpose_dataset().dataset\n        True\n        "
    row_length = instance.get_row_length()
    columns = [instance.get_column_at_index(i) for i in range(0, row_length)]
    instance.dataset = columns
    return instance