'Non linear plug in equation with python

This image is created from an excel spreadsheet. It is a non-linear equation.

This is my formula in python below. The idea is to not use excel to find the values in the non-linear equation and to have python generate it so I can plug it in to the python code below. The data is Time data and Freemium data to create the non linear equation. How would I create and plug this non linear formula into this python equation? More detail: Instead of using the numbers from excel below in my python code, how can I make the same equation from excel in python or individually find the numbers to plug in?

elif model == "freemium":
     if maxtr == 0.5:
         Trdf['PeakTakeRate'] = np.where((Trdf.LocalTime.dt.hour<7|(Trdf.LocalTime.dt.hour==23), 
         (-0.00000000000000156120340733982*Trdf.MSE**6 + 0.000000000002445980326639*Trdf.MSE**5 - 
                0.00000000148477161080055*Trdf.MSE**4 + 0.000000431626329774514*Trdf.MSE**3 - 
                0.0000508635452339198*Trdf.MSE**2 - 0.000887445394111901*Trdf.MSE + 
                0.499125615125612), maxtr)`


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source