Template
fixed off by 1 error in date wrap adjust
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user