0
for i in range(len(index_list)):
    my_df.loc[i, 'transition_code'] = transition_code_dict[my_df.loc[i, 'transition']]

thats my code, which creates a new column based on values from a dict as you can see. problem is that the dataframe has over a million of rows and an iteration like this takes ages. Is there a faster way to do it or do I have to let it run for a night?

Stefan 44
  • 127
  • 1
  • 7

0 Answers0