janboone / programming_for_economists

3 stars 4 forks source link

In-class notebook issue #9

Closed NikolayPavlov98 closed 5 years ago

NikolayPavlov98 commented 5 years ago

Hello, I have a problem with the notebook that we did during the tutorial. In the first screenshot, I asked my tutorial teacher if I did it correctly and he modified it a bit and said its alright. But after that, the built-in code which im suppost to run keeps giving me an error and I do not why. Can you check it out please? Thank you very much I attached pictures of the problem Problem_1
Problem_2 Problem_3

janboone commented 5 years ago

under c) you define the variable number_of_customers, but this is not part of the dataframe df_customers. Therefore, you get an error saying the key (variable) number_of_customers cannot be found in df_customers.

Change the code under c) to: df_customers['number_of_customers'] = np.exp(...)

Then it should work.

NikolayPavlov98 commented 5 years ago

That worked, thank you very much! I have another issue with the class notebook in week 2 Error Could you show me the correct way of doing the profits? Thank you

janboone commented 5 years ago

costs and q are variables/columns in the dataframe. You refer to them as df_simulations['costs'] and df_simulations['q'].

Does this help?

NikolayPavlov98 commented 5 years ago

It did, I understand it better now. But im still getting an error Error_2