'Finding the slope of a pivot table

I have a pivot table that looks something roughly like this:

| temp_bin           | <25th Percent. | 25th-50th Percent. | 50th-75th Percent. | >75th Percent. |
| ------------------ | -------------- | ------------------ | ------------------ | -------------- |
| <25th Percent.     |      12        |          9         |           5        |         1      |
| 25th-50th Percent. |      15        |          11        |           7        |         2      |
| 50th-75th Percent. |      22        |          17        |          12        |         7      | 
| >75th Percent.     |      27        |          24        |          20        |         11     |

where the temp_bin column is the index. The rows represent the temp_bin and the columns represent the bin, ice_creams_sold.

What I want to do is try to find the slope of the left-most column, <25th Percent. , and the bottom most row, >75th Percent. , as the values converge to that point in the bin of <25h Percent., >75th Percent. Any ideas on how to go about that?



Sources

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

Source: Stack Overflow

Solution Source