File size: 631 Bytes
211ff11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)