I get a Nan result when I used KendalTau method via Python.
Here's my python code:
Data imported from Excel
Month BG
0 1 15626
1 2 16266
2 3 20615
3 4 17273
4 5 20002
5 6 42527
6 7 71436
7 8 58615
8 9 38760
9 10 34851
10 11 30580
11 12 36650
tau, p_value = kendalltau("Month" , "BG")
print(tau)
print(p_value)
print()
if p_value < 0.05:
print("The correlation is statistically significant.")
else:
print("The correlation is not statistically significant.")
!!! I imported data from my excel table before code that's that !!!
I was trying to detect if there is a trend in monthly based sales data via Python. I tried KendallTau and expect numerical results instead of Nan value ?