diff --git a/doc/conf.py b/doc/conf.py index b42f4a5ccd0..d7dc68cf703 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1327,11 +1327,16 @@ def reset_warnings(gallery_conf, fname): category=RuntimeWarning, ) # pandas, via seaborn (examples/time_frequency/time_frequency_erds.py) - warnings.filterwarnings( - "ignore", - message=r"iteritems is deprecated.*Use \.items instead\.", - category=FutureWarning, - ) + for message in ( + "use_inf_as_na option is deprecated.*", + r"iteritems is deprecated.*Use \.items instead\.", + "is_categorical_dtype is deprecated.*", + ): + warnings.filterwarnings( + "ignore", + message=message, + category=FutureWarning, + ) # pandas in 50_epochs_to_data_frame.py warnings.filterwarnings( "ignore", message=r"invalid value encountered in cast", category=RuntimeWarning diff --git a/tutorials/epochs/40_autogenerate_metadata.py b/tutorials/epochs/40_autogenerate_metadata.py index df7b59df489..01b9ed0d7ed 100644 --- a/tutorials/epochs/40_autogenerate_metadata.py +++ b/tutorials/epochs/40_autogenerate_metadata.py @@ -48,7 +48,6 @@ import matplotlib.pyplot as plt import mne - data_dir = Path(mne.datasets.erp_core.data_path()) infile = data_dir / "ERP-CORE_Subject-001_Task-Flankers_eeg.fif" @@ -240,6 +239,8 @@ # check whether the response matches the stimulation side, and add this result # to another column. +metadata.loc[:, "stimulus_side"] = "" # initialize column + # left-side stimulation metadata.loc[ metadata["first_stimulus"].isin( @@ -356,6 +357,8 @@ # Exactly like in the previous example, we create new columns ``stimulus_side`` # and ``response_correct``. +metadata.loc[:, "stimulus_side"] = "" # initialize column + # left-side stimulation metadata.loc[ metadata["last_stimulus"].isin( diff --git a/tutorials/epochs/50_epochs_to_data_frame.py b/tutorials/epochs/50_epochs_to_data_frame.py index 164c9120581..66c4443e4a9 100644 --- a/tutorials/epochs/50_epochs_to_data_frame.py +++ b/tutorials/epochs/50_epochs_to_data_frame.py @@ -169,7 +169,6 @@ id_vars=["condition", "epoch"], var_name="channel", value_name="latency of peak" ) ) - ax = sns.violinplot( x="channel", y="latency of peak",