import csv
import pandas as pd


def grab_vals():
    file = "/Users/normrasmussen/Downloads/antho_domains.csv"
    final_array = []
    with open(file, 'r') as file:
        reader = csv.reader(file)
        for row in reader:
            for item in row:
                if item != '':
                    final_array.append(item)

    print(len(final_array))
    final_list = list(set(final_array))
    print(len(final_list))

    final = ["@"+domain for domain in final_list]
    # print(final)
    filecsv = pd.DataFrame(final)
    filecsv.to_csv("/Users/normrasmussen/Downloads/final_domains.csv")


if __name__ == "__main__":
    grab_vals()
