For example I have a dataframe like:
col1 col2 col3
0 2 1
and I want to replace it so that
{0: [a,b], 1: [c,d], 2: [e, f]}
So I want to end up with a dataframe like this:
col1 col1b col2 col2b col3 col3b
a b e f c d
I want to feed this data into tensorflow after transforming it so the below might also be acceptable output if tensorflow would accept it?
col1 col2 col3
[a,b] [e,f] [c,d]
Below is my current code:
field_names = ["elo", "map", "c1", "c2", "c3", "c4", "c5", "e1", "e2", "e3", "e4", "e5", "result"]
df_train = pd.read_csv('input/match_results.csv', names=field_names, skiprows=1, usecols=range(2, 13))
for count in range(1, 6):
str_count = str(count)
df_train['c' + str_count] = df_train['c' + str_count].map(champ_dict)