Skip to content

Commit

Permalink
pandas loc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed Oct 18, 2021
1 parent d38daf9 commit 323c53d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions msnoise/s06compute_dtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,8 @@ def main(interval=1, loglevel="INFO"):
tindex = np.where((tArray >= rmlag) & (tArray <= rMlag))[0]

tmp = np.setdiff1d(np.arange(len(tArray)),tindex)
df['err'][tmp] = 1.0
df['coh'][tmp] = 0.0

df.loc[:, 'err'].iloc[tmp] = 1.0
df.loc[:, 'coh'].iloc[tmp] = 0.0
if first:
tArray = df.index.values
dtArray = df['dt']
Expand Down

0 comments on commit 323c53d

Please sign in to comment.