color-names / clean_colornames.py
BatteRaquette58's picture
Upload 10 files
211ff11 verified
raw
history blame
631 Bytes
import pandas
# from meodai/color-names
df = pandas.read_csv("colornames.csv")
df.drop(columns = ["good name"], inplace = True) # remove good name column
test = df.sample(frac = 0.05) # create test dataset
# export
df.to_csv("colornames-train.csv", index = False)
test.to_csv("colornames-test.csv", index = False)
df.to_pickle("colornames-train.pickle")
test.to_pickle("colornames-test.pickle")
df.to_parquet("colornames-train.parquet", index = False)
test.to_parquet("colornames-test.parquet", index = False)
df.to_json("colornames-train.json", index = False)
test.to_json("colornames-test.json", index = False)