예제 #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)
예제 #2
0
파일: user.py 프로젝트: Taranveer/moocRP
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)
예제 #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)
예제 #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)
예제 #5
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)