Hi,
I am trying to create control chart (P chart) using Pyspc module. I am able to create it for a sample data but when connected with DB I facing issue and unable to generate chart.
The code I am using is:
<Python>
from pyspc import *
a= spc(DPPM) + p()
a + rules()
<Pyhton>
I want to know how we can pass parameter in this module.
Sample Data:
ID --> Supplier-->Month-->Sample_Size-->Defective
21 --> Supplier1 -->201906 -->10440 --> 4
33 --> Supplier1 -->201907 -->14490 --> 6
44 --> Supplier2 -->201906 -->4199 --> 2
21 --> Supplier3 -->201906 -->7356 --> 1
21 --> Supplier1 -->201908 -->1487 --> 10
71 --> Supplier2 -->201910 -->980 --> 3
81 --> Supplier1 -->201910 -->12056 --> 5
35 --> Supplier1 -->202004 -->1177 --> 12
18 --> Supplier2 -->202001 -->16234 --> 1
123 -->Supplier3 -->201908 -->3800 --> 4
213 -->Supplier1 -->201912 -->15 --> 0
22 --> Supplier2 -->202001 -->6 --> 0
I am trying to create control chart (P chart) using Pyspc module. I am able to create it for a sample data but when connected with DB I facing issue and unable to generate chart.
The code I am using is:
<Python>
from pyspc import *
a= spc(DPPM) + p()
a + rules()
<Pyhton>
I want to know how we can pass parameter in this module.
Sample Data:
ID --> Supplier-->Month-->Sample_Size-->Defective
21 --> Supplier1 -->201906 -->10440 --> 4
33 --> Supplier1 -->201907 -->14490 --> 6
44 --> Supplier2 -->201906 -->4199 --> 2
21 --> Supplier3 -->201906 -->7356 --> 1
21 --> Supplier1 -->201908 -->1487 --> 10
71 --> Supplier2 -->201910 -->980 --> 3
81 --> Supplier1 -->201910 -->12056 --> 5
35 --> Supplier1 -->202004 -->1177 --> 12
18 --> Supplier2 -->202001 -->16234 --> 1
123 -->Supplier3 -->201908 -->3800 --> 4
213 -->Supplier1 -->201912 -->15 --> 0
22 --> Supplier2 -->202001 -->6 --> 0