I'm running the below code with .loc on jupyter to:
a) create a new column
b) rerun for alterations
dc5mshift_business.loc[:,"Trading"] = ((dc5mshift_business.index.hour > 1) & (dc5mshift_business.index.hour < 23))
However, the setting with copy warning comes up when the cell is runned the first two times and I dont think it comes up after that.
Neither creation of new column nor chain indexing seems to explain the 2nd time warning so I'm seeking an explanation and solution.