The goal of my code is to try to drop a column each time it shows up. I know there is a way to drop columns without using a for loop. The reason that method does not work is that the columns are dynamic. The problem is that the .drop command is not dropping the column indicated. So here is some pseudocode.
for column_name in column_name_list: # create data_frame1 with the column name # join data_frame with other data_frame2 # Here I drop column_name in data_frame1 data_frame = data_frame.drop(column_name) The problem is after the drop, the column_name is re-appearing during the second iteration. My guess is that I am dropping the column on a copy and it's not "saving" the data_frame with the dropped column. Thank you for all the help.