Currently I have this Situation:
signal_name timestamp signal_value
0 alert 1632733513 on
1 alert 1632733515 off
2 alert 1632733518 on
I want to rename the column signal_value
with the signal_name
. The df was filtered after the signal name alert
so there is no other value for signal_name
.
signal_name timestamp alert
0 alert 1632733513 on
1 alert 1632733515 off
2 alert 1632733518 on
Due to the fact that the signal name is addressed, the first column is no longer needed. So I would like to drop it.
timestamp alert
0 1632733513 on
1 1632733515 off
2 1632733518 on
Since there are multiple df (based on other signal_name
) with this problem, this approach should be generic.