I have attached two dataframes and a sample of their data in the screenshot below.
In dataframe B, for each equipment ID
, we will look into dataframe A using the columns 'CONSTRUCTION_TYPE', 'CONSTRUCTOR', and 'CONSTRUCTION_TYPE_FAMILY'
.
If the conditions match, it will extract two values:
the number of steps for refurbishment and the number of steps for preventive maintenance. However, I am facing a challenge in writing the conditions because the 'CONSTRUCTION_TYPE_FAMILY'
column has multiple conditions.
Sample data for construction type family column
"""RFR 4"" OR ""RR 2"""
""" RFR 6"" OR ""RR 10"""
"RFR 4"
'"M" OR "T" OR "V"
"F" OR "H3xx" OR "300 A" OR "RCM " OR "RBF" OR "UCB"
NOT: RFR 4, RR 2, RFR 6, RR 10, R, C, D, M,T, V, VRC,VM, V, F, H3xx, 300 A, RCM, RBF, UCB, A vide
Sample data for Construction type column
Not "TFO-Reg (tri) RFR 4 New upgrade 2016 {???A}"
Not "TFO-Reg (tri) RFR 6 New upgrade 2016 {800A} "
TFO-Reg (tri) RFR 4 New upgrade 2016 {???A}
TFO-Reg (tri) RFR 6 New upgrade 2016 {800A}