I'm new to python and stuck on a problem. I need to add a column to a dataframe that simply repeats the integers 1 to 8 at 0.5 increments as I read from a live updating csv. I'm totally stuck and everything I've tried has failed. This is the dataframe I have created so far:
CO2_df = pd.DataFrame(CO2_efflux['Date'])
CO2_df['Date'] = pd.to_datetime(CO2_efflux['Date'],format = "%d/%m/%y")
CO2_df['Time'] = pd.DataFrame(CO2_efflux['Time'])
CO2_df['Time'] = pd.to_datetime(CO2_efflux['Time'],format = "%H:%M:%S",errors = 'raise').dt.time
CO2_df['PPM'] = pd.DataFrame(CO2_efflux['PPM'])
Quad = savgol_filter(CO2_df['PPM'], window_length =15, polyorder = 2)
CO2_df['Quad'] = pd.DataFrame(Quad)
CO2_df['MIN'] = Code to add new column that sequentially repeats the numbers 1 to 8 at 0.5 intervals
CO2_df['Leak'] = pd.DataFrame(CO2_df['Quad']+leak_per_min *[[[NEW COLUMN HERE]]])
I'd greatly appreciate any feedback. I have searched for similar solutions but none appear relevant.