I have a dataframe with 2 coulmn, i want to iterate through the column headers, use that value and add a string to it and use it as the name of a list.
rr
resampled=pd.DataFrame()
resampled['RAT']=dd1['RAT']
resampled['SAT']=dd1['SAT']
rr=resampled-resampled.shift(1)
for ind, column in enumerate(rr.columns):
name=column+'stuck'
name=[]
print(name)
I want to get 2 list with names
RATstuck
SATstuck
THank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…