Jun-15-2022, 07:32 PM
I agree that all timestamps are not the same. When the program runs the following code
That is the cause of this error but removing this statement will not fix the error. You just get another error; that error is different.
Now the statement
Will fail when because timestamp is changed. But changed to what? If I knew the answer to the first question then I could make an educated guess.
Any help such as a hint appreciated.
Thanks in advance.
Respectfully,
LZ
# Convert timestamp column into data type into datetime df['timestamp'] = pd.to_datetime(df['timestamp'])things change. I just do not see how they change. It seems it is converting a scalar in timestamp to ...what?
That is the cause of this error but removing this statement will not fix the error. You just get another error; that error is different.
Now the statement
Assign values to series for i in tqdm(range(df.shape[0])): if (df["timestamp"][i].hour >= 4) and (df[timestamp][i].hour < 10): time_period[i]="Morning"
Will fail when because timestamp is changed. But changed to what? If I knew the answer to the first question then I could make an educated guess.
Any help such as a hint appreciated.
Thanks in advance.
Respectfully,
LZ