Skip to content

Commit

Permalink
fix allen errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iamzoltan committed Jul 8, 2024
1 parent 6c32c6a commit e17bbe4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
20 changes: 14 additions & 6 deletions projects/neurons/load_Allen_Visual_Behavior_from_SDK.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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) "
]
},
{
Expand Down Expand Up @@ -606,7 +607,7 @@
"metadata": {},
"outputs": [],
"source": [
"stimulus_table.query('omitted').head(10)"
"stimulus_table.query('omitted', engine='python').head(10)"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -1322,6 +1323,13 @@
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -1338,7 +1346,7 @@
"name": "python3"
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1352,7 +1360,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@
"name": "python3"
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -648,7 +648,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ pathlib
pandas
xkcd
decorator==5.0.9
h5py
opencv-python
torchvision

0 comments on commit e17bbe4

Please sign in to comment.