Usually, I use a list I simplify the timestamp by finding the difference between two successive values like this:
x=[ 1552154111, 1552154115, 1552154117, 1552154120, 1552154125
,1552154127, 1552154134, 1552154137]
List_time = []
for i in x:
List_time.append((i + 1) - x[0])
print(List_time)
[1, 5, 7, 10, 15, 17, 24, 27]
I need to have the same result by using the dataframe, which looks like this:
print(df['Timestamp'])
0 1552154111
1 1552154115
2 1552154117
3 1552154120
4 1552154125
5 1552154127
6 1552154134
7 1552154137
I need to replace the currect timestamp column with the expected difference. I don't know how to do that. It is the first I use a dataframe.
How could I do that please?