Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Aug 1, 2023
1 parent 38ab175 commit 0a19164
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions neurokit2/data/read_xdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ def read_xdf(filename):
df.index.min(), df.index.max(), freq=str(1000 / info["sampling_rate"]) + "ms"
)
# https://stackoverflow.com/questions/47148446/pandas-resample-interpolate-is-producing-nans
df = (
df.reindex(df.index.union(idx))
.interpolate(method="index")
.reindex(idx, "timestamps")
)
df = df.reindex(df.index.union(idx)).interpolate(method="index").reindex(idx)

# Index name
df.index.name = "timestamps"

return df, info

0 comments on commit 0a19164

Please sign in to comment.