I have a data with 600 rows and 8 columns, where I need to perform complex maskings to correctly obtain some key-value pairs. To this end, I do the following operations...
1) Load data from csv into an original dataframe 2) perform some calculations to create 4 more columns (12 columns in total now) 3) perform boolean maskings to section the original dataframe into SEVERAL smaller dataframes 4) finally loop through these smaller dataframes(for loops - within 10-15 rows dataframe) as key-value pairs
This has left my code bloated and running at ~ 8.9secs.(Not good)
I am talking about roughly more than 100 maskings. From here, I believe, this is not the most efficient way.
Should I just get rid of all the maskings and start over to find a faster way?
NOTE: If this is not the right channel of stackoverflow to ask this question,, please flag me and point me to the right one. TIA.