pandas. count
s=data[['노선명','역ID']].drop_duplicates().노선명.value_counts()
line_code['역수']=line_code.노선명.map(s)
line_code
[[day, data[data.사용일자==day].shape[0]] for day in range(20190501,20190532)]
[[20190501, 593], [20190502, 593], [20190503, 593], [20190504, 591], [20190505, 591], [20190506, 592], [20190507, 590], [20190508, 592], [20190509, 591], [20190510, 591], [20190511, 592], [20190512, 590], [20190513, 592], [20190514, 592], [20190515, 592], [20190516, 593], [20190517, 593], [20190518, 591], [20190519, 591], [20190520, 592], [20190521, 592], [20190522, 590], [20190523, 593], [20190524, 592], [20190525, 0], [20190526, 592], [20190527, 590], [20190528, 591], [20190529, 590], [20190530, 591], [20190531, 590]]
{day: data[data.사용일자==day].shape[0] for day in range(20190501,20190532)}
{20190501: 593, 20190502: 593, 20190503: 593, 20190504: 591, 20190505: 591, 20190506: 592, 20190507: 590, 20190508: 592, 20190509: 591, 20190510: 591, 20190511: 592, 20190512: 590, 20190513: 592, 20190514: 592, 20190515: 592, 20190516: 593, 20190517: 593, 20190518: 591, 20190519: 591, 20190520: 592, 20190521: 592, 20190522: 590, 20190523: 593, 20190524: 592, 20190525: 0, 20190526: 592, 20190527: 590, 20190528: 591, 20190529: 590, 20190530: 591, 20190531: 590}