Reputation: 291
I have the following script to selct the columns in my data set :
df_c = pd.DataFrame(df, columns =['Year','Month','Title','Term','date','Company','Location'])
Im applying the following code as a find and replace to each variable separately:
df_c['Location'] = df_c['Location'].str.replace(',', '')
Lets say I have 20 variables how would I do to apply the code to all variables at same time? looping "?
Upvotes: 2
Views: 75