I want to fill a two-dimensional array with series from a data frame call. When I execute the following code, I get the error 'too many indices for array'. When I manually set the shape to the series size, it suddenly switches to be a one position bigger. (The series are around 356 positions)
size_arr = np.empty(shape=(len(business_date_list)))
y_arr = np.empty(shape=(len(business_date_list)))
for i in range(0, len(business_date_list)):
news = model_data['size'].loc[(model_data['date'] == business_date_list[i])]
size_arr[i,:] = news
newy = model_data['changeday'].loc[(model_data['date'] == business_date_list[i])]
y_arr[i,:] = newy
model_data?