def test(): import pandas as pd tuples = [ ('cobra', 'mark i'), ('cobra', 'mark ii'), ('sidewinder', 'mark i'), ('sidewinder', 'mark ii'), ('viper', 'mark ii'), ('viper', 'mark iii') ] index = pd.MultiIndex.from_tuples(tuples) values = [[12, 2], [0,…