I've a dataframe df and it has several columns that start with 'value'. I want to copy this columns as part of another dataframe dfc. There isn't problem to work out, but it warn me with:
SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
The script is:
for a in range(len(assets)):
dfc.loc[:,'value_'+str(assets[a])]= df.loc[:,'value_'+str(assets[a])]