I have a series (saved as series in my code) and want to save its values into two different arrays using python. The first six values I want to save in an array called x, where:
series[0] = x[0,0], series[1] = x[0,1], series[2] = x[0,2], series[3] = x[0,3], series[4] = x[0,4], series[5] = x[0,5], series[6] = x[0,6].
Now switch to series[7] = y[0]. Then repeat and create a new row in x:
series[8] = x[1,0], series[9] = x[1,1], series[10] = x[1,2], series[11] = x[1,3], series[12] = x[1,4], series[13] = x[1,5], series[14] = x[1,6].
Now switch to series[14] = y[1] and continue.
I have only been able to read in the .csv file and convert it from a dataframe to a series. I think this problem can be solved using nested for loops but have been unable to figure it out. Thank you for your help!
Python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
df = pd.read_csv("Data.csv")
series = df['totalBuildingEnergykW_EVERLY_HALL_BUILDING_ENERGY_EnergyMetric']
