Sep-29-2022, 02:58 PM
(This post was last modified: Sep-29-2022, 04:49 PM by Led_Zeppelin.)
I have a few questions about my next step in the analysis. I have attached the page in question which moves label data 10 steps ahead. Since the data occurs
once every minute for 220320 minutes obviously certain changes in the original DataFrame must be made. This method to me seems a long way around and
just a little confusing.
The first part is easiest
There must surely be an easier way than going through all of the data points.
Anyway, that is my first question. Any help appreciated. There just must be a simpler way.
Please note that I have attached the pdf file which shows all of this.
Respectfully,
LZ
once every minute for 220320 minutes obviously certain changes in the original DataFrame must be made. This method to me seems a long way around and
just a little confusing.
The first part is easiest
IndexData_org=pdDataFrame(columns='Index', 'sensor_01', 'sensor_02', 'sensor_03', 'sensor_04', 'sensor_06', 'sensor_10', 'sensor_11', 'sensor_12', 'sensor_58', 'sensor_40', 'machine_status'])Now I am aware that there is an easier way to do what the above Python code does. I have used it many times. The next set of Python lines is what I am confused on.
indexData_org['Index']=range(IndexData.shape.[0] IndexData_org['sensor_01'] = indexData['sensor_01'] IndexData_org['sensor_02'] = indexData['sensor_02'] IndexData_org['sensor_03'] = indexData['sensor_03'] IndexData_org['sensor_04'] = indexData['sensor_04'] IndexData_org['sensor_06'] = indexData['sensor_06'] IndexData_org['sensor_10'] = indexData['sensor_10'] IndexData_org['sensor_11'] = indexData['sensor_11'] IndexData_org['sensor_12'] = indexData['sensor_12] IndexData_org['sensor_38'] = indexData['sensor_38'] IndexData_org['sensor_40'] = indexData['sensor[40']Now I know there is a better way to do this, but I just state this because it leads into the next section which I do have questions on.
for i in tqdm(range(indexData.shape[0]-10) indexData.org[machine_status'][i] =indexData[machine_status][i+10]Now I believe that this is correct, but it just seems a long way around to remove the first ten data points from the DataFrame. This is advancing the data by 10 minutes in order to make a prediction 10 minutes in advance.
There must surely be an easier way than going through all of the data points.
Anyway, that is my first question. Any help appreciated. There just must be a simpler way.
Please note that I have attached the pdf file which shows all of this.
Respectfully,
LZ
Attached Files