Using Python Create Dataframe With Subset And Power