Python Forum
Variances - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Variances (/thread-21656.html)



Variances - kdiba - Oct-08-2019

Metric |Market |Month |Product Grouping |Business Unit |Age_FL |FRR_Actual |FRR_pred| FRR_PrevYear|Year

Hello,
I'm trying to calculate variances for each month for actual vs TDC Pred and Prev Year

Input :
merged['FRR_Pred VAR]=(merged['FRR Actual']-merged['FRR_Pred'])* * 2
merged['FRR_PrevYear VAR]=(merged['FRR Actual']-merged['FRR_PrevYear'])* * 2

Output :
name'merged' is not defined

Can you help me with this ? please


RE: Variances - stullis - Oct-08-2019

You'll have to provide more than that. The error indicates the variable "merged" has not been declared before it's called. Without more information, there isn't much help that anyone can provide.