The issue with number signs. When running the same code, it sometimes returns the correct signs for the numbers, but in the next run, it might return the correct absolute values, but completely random signs for the numbers. What could be the problem?
…
dev = ((price1 – price2)).where((price1.notna()) & (column == 0), np.nan)
dev = ((price2 – price1)).where((price1.notna()) & (column == 0),
return dev.round(2)
`
Where price1, price2, column – pd.Series
user25710449 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1