I need to split each column according to percentages found in another df. E.g.:
>>> import pandas as pd
>>>
>>> things = ['some thing', 'another thing']
>>>
>>> amount = pd.DataFrame({2019: [10, 20], 2020: [100, 200]}, index=things)
>>> amount
2019 2020
some thing 10 100
another thing 20 200
>>>
>>> split = pd.DataFrame({'first': [0.2, 0.9], 'second': [0.8, 0.1]}, index=things)
>>> split
first second
some thing 0.2 0.8
another thing 0.9 0.1
>>>
>>> result = amount ??? split # how to do this?
>>> result
2019 2020
first second first second
some thing 2 8 20 80
another thing 18 2 180 20
How can I do this in pandas in one simple shot?