I have a .xlsx file with column ['Bulb1_Cmd']
I want to multiply every item in that column by 10, update the dataframe and save as a new .xlsx file.
My current code that multiplies each value by 10 is:
df=pd.read_excel("bulb_data.xlsx")
s=df['Bulb1_Cmd']
for i in s.loc[:]:
if i>0:
ss=s.loc[:]*10
This will make a dataframe with the desired values, but I cannot figure out how to update the original dataframe with the new values.
I have tried
s.append(ss)
df.to_excel("newFile.xlsx")
with no luck