The output that the get_history function returns is not in the best format. The first column contains dates, the first row contains RICs, and the second row contains fields. I want to have the data in the following format: the first column should contain dates, the second column should contain RICs, and the other columns should contain the field values corresponding to the date and RIC for each observation. How can I format it this way in Python? Additionally, there is another problem: the get_history function sometimes returns multiple rows for the same date and RIC, with some field values displayed in the first row and some field values displayed in the second row. I don't know whether this is a bug or a feature. The output format I'd like to have is in the picture.