fixed off by 1 error in date wrap adjust

This commit is contained in:
ken
2024-09-01 12:03:54 -07:00
parent 418813ece2
commit e977a3773f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -133,8 +133,8 @@ def fix_newday(df,idx):
t1 is time before idx
t2 is time after idx
"""
t1=df['TIME'][:idx+1]
t2=df['TIME'][idx+1:]
t1=df['TIME'][:idx]
t2=df['TIME'][idx:]
t2a=pd.DataFrame([x+datetime.timedelta(days=1) for x in t2]) # add 1 day to t2
t2as=t2a.iloc[:,0] # get series
t2as.name='TIME'
+2 -2
View File
@@ -138,8 +138,8 @@ def fix_newday(df,idx):
t1 is time before idx
t2 is time after idx
"""
t1=df['TIME'][:idx+1]
t2=df['TIME'][idx+1:]
t1=df['TIME'][:idx]
t2=df['TIME'][idx:]
t2a=pd.DataFrame([x+datetime.timedelta(days=1) for x in t2]) # add 1 day to t2
t2as=t2a.iloc[:,0] # get series
t2as.name='TIME'