Jul-30-2019, 12:59 AM
Not sure about the code, it is hard to understand, at least, for me. However, you can
improve some steps, e.g. inclusion check could be done using
improve some steps, e.g. inclusion check could be done using
.isin
method, e.g.df['B'] = df['Model Code'].isin(ListB) # optionally, you can convery bools to ints by applying `.astype(int)`