I have multiple dataframes stored in a dictionary.
Each dataframe has 3 columns as shown below
exceldata_1['Sheet1']
0 1 2
0 Sv2.55+Fv2.04R02[2022-01-01T00 16 29.464Z]
1 - SC OK NaN
2 - PC1 Number 1 NaN
3 - PC1 Main Status OK NaN
4 - PC1 PV 4294954868 NaN
... ... ... ...
1046 - C Temperature 17�C NaN
1047 Sv2.55+Fv2.04R02[2022-01-01T23 16 30.782Z]
1048 - Level SS High NaN
1049 Sv2.55+Fv2.04R02[2022-01-01T23 16 34.235Z]
1050 Sv2.55+Fv2.04R02[2022-01-01T23 16 38.657Z]
1051 rows × 3 columns
I want to do this : Search each row of dataframe if it contains "Sv2." and change that row as follows Remove "Sv2.55+Fv2.04R02[" this part and combine the remaining data to form the date and time correctly in each column....Showing the desired outpu below...The last column can be deleted as it will not contain any data after performing this operation.
0 1 2
0 2022-01-01 00:16:29 NaN
1 - SC OK NaN
2 - PC1 Number 1 NaN
3 - PC1 Main Status OK NaN
4 - PC1 PV 4294954868 NaN
... ... ... ...
1046 - C Temperature 17�C NaN
1047 2022-01-01 23:16:30 NaN
1048 - Level SS High NaN
1049 2022-01-01 23:16:34 NaN
1050 2022-01-01 23:16:38 NaN
1051 rows × 3 columns
How can I achieve this?
Unnamed: 0the index of the dataframe, or is it actually part of column 0 and you want to contain it in column 0? Best would be if you do adf.head(10).to_dict()or so and add it to the question, to avoid confusion.