I am loading information into a DataFrame of the Python Panda module, where I have a timestamp type record, that information is brought from MongoDb
cursor = collection.find( { "sono" : str(sono), "time" : { "$gt" : int(start) }, "time" :{"$lt": int(end) }}, {"time" : 1, "timezone" : 1, "_id" :0 })
df = pd.DataFrame(list(cursor),columns=['time','timezone'])
Then I load the information in the DataFrame:
df = pd.DataFrame(list(cursor),columns=['time','timezone'])
Then I convert the data type timestamp to datetime:
df['time'] = pd.to_datetime(df['time'], unit='s')
Now the problem is I need to add the timezone column to the time
The information that I display is:
time timezone
0 2018-08-14 15:31:50 +3
1 2018-08-14 15:31:51 +3
2 2018-08-14 15:31:52 +3
3 2018-08-14 15:31:53 +3
4 2018-08-14 15:31:54 +3
5 2018-08-14 15:31:55 +3
It should look like this:
time timezone
0 2018-08-14 18:31:50 +3
1 2018-08-14 18:31:51 +3
2 2018-08-14 18:31:52 +3
3 2018-08-14 18:31:53 +3
4 2018-08-14 18:31:54 +3
5 2018-08-14 18:31:55 +3