import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
import pyspc as spc
xbardata= pd.read_excel("F:/2019 GB Python/pyspc_XbarR.xlsx")
xbardata.head()
from pyspc import *
a= spc(xbardata) + xbar_rbar() + rbar()
print(a)
from pyspc import *
a= spc(xbardata) + xbar_rbar() + rbar() + rules()
print(a)
from pyspc import *
a = spc(xbardata) + xbar_sbar() + sbar() + rules()
print(a)
xdata= pd.read_csv("F:/2019 GB Python/pyspc_X.csv")
xdata.head()
from pyspc import *
a = spc(xdata) + mr() +rules()
print(a)
Mean =xdata.loc[:,"X"].mean()
sns.lineplot(x=xdata.index, y=xdata.X)
sns.lineplot(x=xdata.index, y=Mean)
plt.title("Individuals Run Chart")