text_plain_output_1.png
from pandas.io.json import json_normalize

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

with open('../input/matches.txt') as file:
    CR = [x.strip() for x in file.readlines()]

deserialize_cr = [json_normalize(eval(r1)) for r1 in CR[0:10000]]
df_cr = pd.concat(deserialize_cr, ignore_index=True)

Left_Troops = list(np.hstack([[x[0] for x in left_deck] for left_deck in df_cr['players.left.deck']]))
Right_Troops = list(np.hstack([[x[0] for x in right_deck] for right_deck in df_cr['players.right.deck']]))
distinct_troops = set(np.hstack([Left_Troops, Right_Troops]))
len(distinct_troops)