Created
October 6, 2022 15:07
-
-
Save h3ik0th/a39b34b662fddeaa46b9f77a7bea9859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%time | |
# conventional loop using iloc - iteration crime | |
dfY = pd.DataFrame() | |
for i in range(dfS.shape[0]): | |
res = myfunc1(dfS["B"].iloc[i], dfS["C"].iloc[i]) | |
dfY = pd.concat([dfY, pd.DataFrame([res])], ignore_index=True) | |
dfY.rename(columns={0:"x", 1:"y", 2:"z"}, inplace=True) | |
display(dfY.tail()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment