Example #1
0
def scrubfile(f1, f2):
    """
    Traverse a csv file, copying lines with the right number of entries to a second csv file
    
    Parameters:
    --------------
    f1: csv.reader
        An open csv.reader object, containing the raw data
    f2: csv.writer
        An open csv.writer object, to which the scrubbed data will be written
    """
    xmltocsv.scrubcsv(f1, f2, 22)
Example #2
0
def scrubfile(f1, f2):
    '''
    Traverse a csv file, copying lines with the right number of entries to a second csv file
    
    Parameters:
    --------------
    f1: csv.reader
        An open csv.reader object, containing the raw data
    f2: csv.writer
        An open csv.writer object, to which the scrubbed data will be written
    '''
    xmltocsv.scrubcsv(f1, f2, 22)
Example #3
0
def scrubprofile(f1, f2):
    '''
    Scrubs a CSV file of student profile data, removing lines of the wrong size
    
    Parameters
    ------------------
    f1: csv.reader
        An open csv reader containing the student profile data
    f2: csv.writer
        An open csv writer that will have the scrubbed data written to it
    
    '''
    xmltocsv.scrubcsv(f1, f2, 13)
Example #4
0
def scrubstate(f1, f2):
    """
    Clean up the state of a course enrollment csv file
    
    Reads through a csv file containing the course enrollment data, removing any
    lines that are of the wrong size. Produces a scrubbed csv file
    
    Parameters
    --------------
    f1: csv reader
        An open csv reader, containing the data to be cleaned up
    f2: csv writer
        An open csv writer, that will take all of the lines of the right 
        size
    """

    xmltocsv.scrubcsv(f1, f2, 4)
def scrubstate(f1, f2):
    '''
    Clean up the state of a course enrollment csv file
    
    Reads through a csv file containing the course enrollment data, removing any
    lines that are of the wrong size. Produces a scrubbed csv file
    
    Parameters
    --------------
    f1: csv reader
        An open csv reader, containing the data to be cleaned up
    f2: csv writer
        An open csv writer, that will take all of the lines of the right 
        size
    '''

    xmltocsv.scrubcsv(f1, f2, 4)