I\'ve been trying to implement the following SAS code in Python, and while I haven\'t had any problems translating the code that converts the table into what I require, I have b