(Oct-16-2020, 05:32 PM)jefsummers Wrote: Not sure I understand, but I would suggest using .map to get multiple columns with values - commonly used for "one hot" encoding.
Don't think this will do the trick.
Currently I have a dataframe with a dozen or so index items as such:
Output:
Q2-2020
Total Equity 4827.6
Loan Book 21192.5
Total Deposits 23312.4
Total Interest Income 1178.2
Net Interest Income 770.4
Credit Loss Allowance (264.5)
Net Interest After Credit Loss Allowance 505.9
Fee and Commission Income 342.3
Revenue from Non-Core Business 21.9
Insurance Premiums 80
Operating Income 708.2
Staff and Administrative Expenses (341.6)
EBIT 366.6
Attributable Net Income 287.2
Capex (64.1)
Gross Interest Margin 0.429384
Return on Equity 0.0594913
Return on Assets 0.00886874
I want to organize the index into groups that will each have a heading.
I want something like this:
Output:
Q2-2020
Balance Sheet
ASSETS
Cash and cash equivalents 2567.4
Mandatory cash balances with central banks 246.8
Due from banks 1481.3
Loans and advances to customers 21192.5
Securities 3961
Financial instruments pledged under repurchase ... 884
Derivative financial assets 278.7
Deferred tax asset 20.9
Premises, equipment and right-of-use assets 708.5
Assets of the disposal groups and non-current a... 31.2
Other assets 1011.1
TOTAL ASSETS 32383.4
LIABILITIES
Due to banks 712.1
Due to individuals 15108.2
Due to corporate customers 8204.2
Debt securities in issue 809.1
Where ASSETS and LIABILITIES are in the index but have no data, they are just the headings of index components.