diff --git a/projects/neurons/load_Allen_Visual_Behavior_from_SDK.ipynb b/projects/neurons/load_Allen_Visual_Behavior_from_SDK.ipynb index 27b30695c..83492c5f4 100644 --- a/projects/neurons/load_Allen_Visual_Behavior_from_SDK.ipynb +++ b/projects/neurons/load_Allen_Visual_Behavior_from_SDK.ipynb @@ -99,7 +99,8 @@ "\n", "pd.set_option('display.max_columns', 500)\n", "# this line may be needed if you run into Error in pandas query function\n", - "pd.DataFrame.query = lambda self, expr, **kwargs: self.query(expr, engine='python', **kwargs) " + "# Otherwise set the engine to python in queries made throught the book\n", + "# pd.DataFrame.query = lambda self, expr, **kwargs: self.query(expr, engine='python', **kwargs) " ] }, { @@ -606,7 +607,7 @@ "metadata": {}, "outputs": [], "source": [ - "stimulus_table.query('omitted').head(10)" + "stimulus_table.query('omitted', engine='python').head(10)" ] }, { @@ -637,7 +638,7 @@ " data=neural_data.query('cell_specimen_id == @cell_id'),\n", " t='timestamps',\n", " y='dff',\n", - " event_times=stimulus_table.query('omitted')['start_time'],\n", + " event_times=stimulus_table.query('omitted', engine='python')['start_time'],\n", " t_before=3,\n", " t_after=3,\n", " output_sampling_rate=50,\n", @@ -747,7 +748,7 @@ " data=df,\n", " t='timestamps',\n", " y=y,\n", - " event_times=stimulus_table.query(event_query)['start_time'],\n", + " event_times=stimulus_table.query(event_query, engine='python')['start_time'],\n", " t_before=t_before,\n", " t_after=t_before,\n", " output_sampling_rate=50,\n", @@ -1322,6 +1323,13 @@ }, "outputs": [], "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -1338,7 +1346,7 @@ "name": "python3" }, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1352,7 +1360,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.9.16" } }, "nbformat": 4, diff --git a/projects/neurons/load_Allen_Visual_Behavior_from_pre_processed_file.ipynb b/projects/neurons/load_Allen_Visual_Behavior_from_pre_processed_file.ipynb index 02df26aa6..779840891 100644 --- a/projects/neurons/load_Allen_Visual_Behavior_from_pre_processed_file.ipynb +++ b/projects/neurons/load_Allen_Visual_Behavior_from_pre_processed_file.ipynb @@ -634,7 +634,7 @@ "name": "python3" }, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -648,7 +648,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.9.16" } }, "nbformat": 4, diff --git a/requirements.txt b/requirements.txt index f2de6194f..36beae4a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,6 @@ pathlib pandas xkcd decorator==5.0.9 +h5py +opencv-python +torchvision