def data_replace(con, now, vendor_id, ticker_id, data, time_span):
    """
    INPUTS:
        con (mysql) - pymysql database connection
        now (datetime) - Python datetime object in Central Time
        vendor_id (str) - For example,'1' for Yahoo Finance
        ticker_id (int) - Ticker id number from symbols table
        data (list) - List of tuples (ohlcv...)
        time_span (str) - Specify "daily" or "weekly"
    OUTPUT:
        Appends vendor ID and symbol ID to data. Adds result
        to either daily_data or weekly_data table.
    """

    # Amend the data to include the vendor ID and symbol ID
    data = [(ticker_id,) + d + (now, vendor_id) for d in data]

    # Create the insertion strings
    table = "{}_data".format(time_span)  # time_span = "daily"
    cols = ["symbol_id","price_date","open","high","low","close","volume",
            "ex_dividend","split_ratio","adj_open","adj_high","adj_low",
            "adj_close","adj_volume","last_update", "vendor_id"]
    header = ",".join(cols)
    inserts = ("%s,"*len(cols))[:-1]
    sql = "REPLACE INTO {} ({}) VALUES ({})".format(table, header, inserts)

    # REPLACE the data into a MySQL database table
    with con.cursor() as cur:
        cur.executemany(sql, data)
        results = con.commit()

    return results