-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_test.txt
23 lines (16 loc) · 974 Bytes
/
sample_test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Please do the following exercise using pandas.
using two input files dataset1 and dataset2
join dataset1 with dataset2 and get tier
generate below output file
legal_entity, counterparty, tier, max(rating by counterparty), sum(value where status=ARAP), sum(value where status=ACCR)
Also create new record to add total for each of legal entity, counterparty & tier.
Sample data:
legal_entity, counterparty, tier, max(rating by counterparty), sum(value where status=ARAP), sum(value where status=ACCR)
L1,Total, Total, calculated_value, calculated_value,calculated_value
L1, C1, Total,calculated_value, calculated_value,calculated_value
Total,C1,Total,calculated_value, calculated_value,calculated_value
Total,Total,1,calculated_value, calculated_value,calculated_value
L2,Total,Total,calculated_value, calculated_value,calculated_value
....
like all other values.
where calculated_value in sample data needs to be calculated using above method.