kitir/_libs/csv_utils.py
def read_tsv_from_string(text, return_headers=False):
    """
    reads a tsv (tab separated values) string using DictReader and returns a rowdicts list
    :param text: string to parse TSV from
    :param return_headers: return value becomes (rows, headers)
    :return: rows read from csv
    """
    log.trace('reading tsv string: content[:20]={} len={}'.format(repr(text[:20]), len(text)))
    reader = csv.DictReader(text.splitlines(), dialect='excel-tab')
    rows = [row for row in reader]
    if return_headers:
        return rows, reader.fieldnames
    return rows

    reads a tsv (tab separated values) string using DictReader and returns a rowdicts list
    :param text: string to parse TSV from
    :param return_headers: return value becomes (rows, headers)
    :return: rows read from csv
    
reads a tsv (tab separated values) string using DictReader and returns a rowdicts list
reads a tsv ( tab separated values ) string using DictReader and returns a rowdicts list
def read_tsv_from_string(text, return_headers=False):
    log.trace('reading tsv string: content[:20]={} len={}'.format(repr(text[:20]), len(text)))
    reader = csv.DictReader(text.splitlines(), dialect='excel-tab')
    rows = [row for row in reader]
    if return_headers:
        return rows, reader.fieldnames
    return rows
def read_tsv_from_string ( text , return_headers = False ) : log . trace ( 'reading tsv string: content[:20]={} len={}' . format ( repr ( text [ : 20 ] ) , len ( text ) ) ) reader = csv . DictReader ( text . splitlines ( ) , dialect = 'excel-tab' ) rows = [ row for row in reader ] if return_headers : return rows , reader . fieldnames return rows
reads a tsv (tab separated values) string using DictReader and returns a rowdicts list
reads a tsv ( tab separated values ) string using DictReader and returns a rowdicts list
"""
    reads a tsv (tab separated values) string using DictReader and returns a rowdicts list
    :param text: string to parse TSV from
    :param return_headers: return value becomes (rows, headers)
    :return: rows read from csv
    """
rows read from csv
rows read from csv
text
string to parse TSV from
string to parse TSV from
return_headers
return value becomes (rows, headers)
return value becomes ( rows headers )