04SystemCube
Class SystemCubeChecker
¶
A notebook to showcase the usage of SystemCubeChecker
class
In [1]:
Copied!
# import class
from blueautomata.system_cube import SystemCubeChecker
import pandas as pd
# import class
from blueautomata.system_cube import SystemCubeChecker
import pandas as pd
In [3]:
Copied!
preview = pd.read_excel('data/fakesystem/experiment/sample2.xlsx')
preview.head()
preview = pd.read_excel('data/fakesystem/experiment/sample2.xlsx')
preview.head()
Out[3]:
Department | Dept | User ID | Name | System1 | Cube | |
---|---|---|---|---|---|---|
0 | GOOG | ewbzm6yv67w33mxy9 | Christopher Bruce | Avatar | NaN | |
1 | Apple | AAPL | wrzzdur66uzwvb0dh | Michael Perez | Ironman | NaN |
2 | Apple | AAPL | aurg7k1rxgmnsylsv | Stephanie Carr | Thor | NaN |
3 | Apple | AAPL | np81yvtz4zcum4h39 | Julia Vargas | Spiderman | NaN |
4 | Apple | AAPL | 99ttcx5t43r1rrwr1 | Michelle Walker | Eternals | NaN |
- You can see that the
System1
column the items are wrong, the items are cube and the system should be nameMarvel
In [4]:
Copied!
test = SystemCubeChecker(
masterlistpath = 'data/fakesystem/experiment/sample2.xlsx',
system_to_check= ['Avatar', 'Ironman', 'Thor', 'Spiderman', 'Eternals'],
cube_to_assign='Marvel'
)
df = test.system_cube_update()
df.head()
test = SystemCubeChecker(
masterlistpath = 'data/fakesystem/experiment/sample2.xlsx',
system_to_check= ['Avatar', 'Ironman', 'Thor', 'Spiderman', 'Eternals'],
cube_to_assign='Marvel'
)
df = test.system_cube_update()
df.head()
Out[4]:
Department | Dept | User ID | Name | System1 | Cube | |
---|---|---|---|---|---|---|
0 | GOOG | ewbzm6yv67w33mxy9 | Christopher Bruce | Marvel | Avatar | |
1 | Apple | AAPL | wrzzdur66uzwvb0dh | Michael Perez | Marvel | Ironman |
2 | Apple | AAPL | aurg7k1rxgmnsylsv | Stephanie Carr | Marvel | Thor |
3 | Apple | AAPL | np81yvtz4zcum4h39 | Julia Vargas | Marvel | Spiderman |
4 | Apple | AAPL | 99ttcx5t43r1rrwr1 | Michelle Walker | Marvel | Eternals |
- You can see the system and cube are correctly updated
Last update:
2023-09-07
Created: 2023-09-07
Created: 2023-09-07