def read_csv_as_integer(csv_name, integer_columns, usecols=None):
    """Returns a DataFrame from a .csv file stored in /data/raw/.
    Converts columns specified by 'integer_columns' to integer.
    """
    csv_path = os.path.join(DATA_FOLDER, csv_name)
    csv = pd.read_csv(csv_path, low_memory=False, usecols=usecols)
    for column in integer_columns:
        csv = csv[pd.to_numeric(csv[column], errors="coerce").notnull()]
    csv[integer_columns] = csv[integer_columns].apply(pd.to_numeric)
    return csv
def read_csv_as_integer ( csv_name , integer_columns , usecols = None ) : csv_path = os . path . join ( DATA_FOLDER , csv_name ) csv = pd . read_csv ( csv_path , low_memory = False , usecols = usecols ) for column in integer_columns : csv = csv [ pd . to_numeric ( csv [ column ] , errors = "coerce" ) . notnull ( ) ] csv [ integer_columns ] = csv [ integer_columns ] . apply ( pd . to_numeric ) return csv
Returns a DataFrame from a .csv file stored in /data/raw/.
    Converts columns specified by 'integer_columns' to integer.