Oct-02-2020, 06:59 PM
Hello all
I have a csv file with over 60,000 rows of data which i have imported into a dataframe, I want to perform varies calculations on this dataframe.
I am looping through the data using a while loop and a counter.
At each iteration of the counter i am performing some arithmetic, the code i have is as follows:-
Thank you
I have a csv file with over 60,000 rows of data which i have imported into a dataframe, I want to perform varies calculations on this dataframe.
I am looping through the data using a while loop and a counter.
At each iteration of the counter i am performing some arithmetic, the code i have is as follows:-
q = 0 while q < len(df_raw_data): df_raw_data.iloc[q,5] = (df_raw_data.iloc[q,3] * 8950) + (df_raw_data.iloc[q,4]) q = q + 1This code works and i fully understand it however it takes ages and i wanted to know if there was a better way of loop through large data sets.
Thank you