The whatif package helps you build business analysis oriented models in Python that you might normally build in Excel. Specifically, whatif includes functions that are similar to Excel's Data Tables and Goal Seek for doing sensitivity analysis and "backsolving" (e.g. finding a breakeven point). It also includes functions for facilitating Monte-Carlo simulation using these models.
Related blog posts
This package is also developed as part of one of the courses I teach. You can find the course web pages at:
The whatif package is new and quite small. It contains:
Model
class that can be subclassed to create new modelsdata_table
) and goal seek (goal_seek
) on a modelssimulate
)Clone the whatif project from GitHub:
.. code::
git clone https://github.com/misken/whatif.git
and then you can install it locally by running the following from the project directory.
.. code::
cd whatif
pip install .
See the materials in the blog posts and course webs listed above.
The project is licensed under the MIT license.