for idx, item in enumerate(hazlist): index = ['Asset','Environment','People','Economy']…
Jump to turn (9)
- 1for idx, item in enumerate(hazlist): index = ['Asset','Environment','People','Ec
- 2i need to use pandarallel
- 3HOw to apply this pandarellel code for my loop
- 4can I use lambda function along with pandarallel
- 5can you please write this for my loop
- 6for idx, item in enumerate(hazlist): index = ['Asset','Environment','People','Ec
- 7I am getting processitem as undefined
- 8still I am getting processitem undefined
- 9can I call the process item function inside function run
- User
for idx, item in enumerate(haz_list): index = ['Asset','Environment','People','Economy'] print(item) y=loaded_model.predict([item]) y=index[y[0]] hazards.append({ "Hazard": item, "Severity_Score": int(clsr[2][idx]), "Severity":severity_dict_r[int(clsr[2][idx])] , "Likelihood": likelihood_dict_r[int(clsr[1][idx])], "likelihood_Score": int(clsr[1][idx]), "Risk_Score": int(clsr[3][idx]), "Impact_Area":y, "Controls": self.convert_params(clsr[0], idx, param_type="controls") }) print(item) res.append({"Task": row["Activity Non-Transformed"], "Hazards": hazards}) print(res) self.result = pd.DataFrame.from_dict(res)
change this for loop to fast api lambda anf pandarellel for parallel processing
- Assistant