how do i install local library "tutorials" in the visual studio code #97
Replies: 3 comments 12 replies
-
if you want to run the model from the tutorials folder in Visual Studio Code, then you need to:
from: assumption["mortality"] = pd.read_csv("./input/mortality.csv")
assumption["interest_rates"] = pd.read_csv("./input/interest_rates.csv") to: assumption["mortality"] = pd.read_csv("tutorials/annuity/input/mortality.csv")
assumption["interest_rates"] = pd.read_csv("tutorials/annuity/input/interest_rates.csv")
Please let me know if that helped or if you have any other question! P.S. The models in the tutorials folder are there to support the section in the documentation. |
Beta Was this translation helpful? Give feedback.
-
I do not know exactly what causes your issue and I can't reproduce it. However, I have two further ideas that we can try out. Idea 1: Install terminal
Perhaps the package tries to install from the local folder and you are missing some packages. Idea 2: You are trying to run from the same folder where the whole package is stored. https://www.youtube.com/watch?v=MDSWMa5UbBw Hope that helps. Let me know in case of any other questions! |
Beta Was this translation helpful? Give feedback.
-
below the general description of the whole code. Hope that helps. The code in the cashflower package helps to transform the formulas defined by the user into the output reports. admin.py As a first step, the user needs to create a model. The code in the admin.py script helps with this step. The create_model() function copies template files from the model_tpl folder and replaces parts that require a model name. start.py Once the user has populated files with the formulas, the model gets started using code in the start.py script. The main function is start() . The start() function gathers all components of the model:
After that, it creates the instance of the Model class which is used to calculate and save the results. cashflow.py The cashflow.py script contains the classes for all the main objects, such as:
The model object that has been created in the start.py script creates a queue of model components (variables and constants) in a way that there are no calculation conflicts. After that, it iterates over each policy and calculates results for all of the components. After the calculation is complete, the results are saved to the flat files (csv). Hope that helps as a start. Let me know if you have any other questions! |
Beta Was this translation helpful? Give feedback.
-
when i am running the code,i am getting the error at "from tutorials.annuity.input import policy, assumption" module not found : tutorial...i want to install the library...
Beta Was this translation helpful? Give feedback.
All reactions