Skip to content

Commit

Permalink
Re-order setting ophys session index for better typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Oct 28, 2023
1 parent f998f0b commit f2484b7
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,9 @@ def get_ophys_session_table(self) -> pd.DataFrame:
"""
# There is one ophys_session_id from 2018 that has multiple behavior
# ids, causing duplicates -- drop all dupes for now; # TODO
table = (
self._get_ophys_session_table()
.drop_duplicates(subset=["ophys_session_id"], keep=False)
.set_index("ophys_session_id")
table = self._get_ophys_session_table().drop_duplicates(
subset=["ophys_session_id"],
keep=False
)

# Fill NaN values of imaging_plane_group_count with zero to match
Expand All @@ -531,7 +530,7 @@ def get_ophys_session_table(self) -> pd.DataFrame:
input_df=table,
column_order=VBO_METADATA_COLUMN_ORDER
)
return table
return table.set_index("ophys_session_id")

def get_behavior_session(
self, behavior_session_id: int
Expand Down

0 comments on commit f2484b7

Please sign in to comment.