Feb-13-2023, 02:09 PM
(Feb-13-2023, 02:07 PM)catlessness Wrote: Why am I getting the "setting with copy" warning with the code below? Am I not doing what they suggested? And the result is wrong so I guess there is some problem with this.Oh the result is right I just checked again
import pandas as pd ''' ... ''' #dfout is a pd.DataFrame instance dfout.columns=[0,1,2] dfout.loc[:,3]=dfout.loc[:,0] dfout.loc[:,4]=dfout.loc[:,1] dfout.loc[:,5]=dfout.loc[:,2] dfout.loc[:,6]=np.sqrt(dfout.loc[:,4]**2+dfout.loc[:,5]**2) dfout.loc[:,7]=np.arctan(dfout.loc[:,5]/dfout.loc[:,4])/np.pi*360Thanks