Skip to content

Commit

Permalink
MAINT: Fix for pandas pre
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 10, 2024
1 parent 4750f0d commit 1859771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mne/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2977,11 +2977,11 @@ def _ensure_list(x):
*last_cols,
]

data = np.empty((len(events_df), len(columns)))
data = np.empty((len(events_df), len(columns)), float)
metadata = pd.DataFrame(data=data, columns=columns, index=events_df.index)

# Event names
metadata.iloc[:, 0] = ""
metadata["event_name"] = ""

# Event times
start_idx = 1
Expand All @@ -2990,7 +2990,7 @@ def _ensure_list(x):

# keep_first and keep_last names
start_idx = stop_idx
metadata.iloc[:, start_idx:] = None
metadata[columns[start_idx:]] = ""

# We're all set, let's iterate over all events and fill in in the
# respective cells in the metadata. We will subset this to include only
Expand Down

0 comments on commit 1859771

Please sign in to comment.