I'm trying to populate a simple numbered column on my pandas dataframe, for reference later. My for loop for doing that is as below:
for x in ((jac_input.index)/2):
jac_output['Cycles'][x] = x+1
However, when running the script, I get this error:
SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
Why would my simple for loop cause this error? I'm just getting back into programming so I'm confused as to why this is happening, any help would be greatly appreciated.