03Inconsistency
Class Inconsistency¶
A notebook to showcase the usage of Inconsistency class
In [1]:
Copied!
# import class
from blueautomata.inconsistency import Inconsistency
import pandas as pd
# import class
from blueautomata.inconsistency import Inconsistency
import pandas as pd
In [2]:
Copied!
preview = pd.read_excel('data/fakesystem/experiment/sample1.xlsx')
preview.head()
preview = pd.read_excel('data/fakesystem/experiment/sample1.xlsx')
preview.head()
Out[2]:
| Name | Cube | |
|---|---|---|
| 0 | Christopher bt Bruce | Iron |
| 1 | Michael perez | Bronze |
| 2 | Stephanie ccarr | Metal |
| 3 | Julia bin Vargas | Silver |
| 4 | Michelle WalKer | Gold |
- The correct name should be
Christopher Bruce,Michael Perez,Stephanie Carr,Julia VargasandMichelle Walkeraccording to the staff data.
In [3]:
Copied!
test = Inconsistency(
filepath="data/fakesystem/experiment/sample1.xlsx",
staff_data="data/fake_hr_data.xlsx",
checklist="data/checklist.xlsx",
sheet_number=0,
)
df = test.fix_inconsistency()
df.head()
test = Inconsistency(
filepath="data/fakesystem/experiment/sample1.xlsx",
staff_data="data/fake_hr_data.xlsx",
checklist="data/checklist.xlsx",
sheet_number=0,
)
df = test.fix_inconsistency()
df.head()
Out[3]:
| Department | Dept | User ID | Name | System1 | Cube | |
|---|---|---|---|---|---|---|
| 0 | GOOG | EWBZM6YV67W33MXY9 | Christopher Bruce | KLSE | Iron | |
| 1 | Apple | AAPL | WRZZDUR66UZWVB0DH | Michael Perez | KLSE | Bronze |
| 2 | Apple | AAPL | AURG7K1RXGMNSYLSV | Stephanie Carr | KLSE | Metal |
| 3 | Apple | AAPL | 99TTCX5T43R1RRWR1 | Michelle Walker | KLSE | Gold |
| 4 | Apple | AAPL | 2U5PJRW18MG4XGATV | David Carpenter | KLSE | Titanium |
- You can see that the name of the persons are being fixed
Last update:
2023-09-07
Created: 2023-09-07
Created: 2023-09-07