Skip to content

Commit

Permalink
Deal with seemingly stochastic return of deleted&superceded_id cols
Browse files Browse the repository at this point in the history
I'm not sure what's going on but it seems like two columns are included
sometimes and excluded other times in the result of the cave table
query. I don't care enough to investigate so I'm just going to try
dropping them both and ignore column-not-found errors.
  • Loading branch information
jasper-tms committed May 19, 2023
1 parent 2df090a commit 88c63ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slackbots/neuron_information_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def process_message(message: str, user: str, fake=False) -> str:
if return_as == 'dataframe':
info.drop(columns=['id', 'valid', 'pt_supervoxel_id',
'pt_root_id', 'pt_position', 'deleted',
'superceded_id'], inplace=True)
'superceded_id'],
errors='ignore',
inplace=True)
info.rename(columns={'tag': 'annotation',
'tag2': 'annotation_class'}, inplace=True)
info['created'] = info.created.apply(lambda x: x.date())
Expand Down

0 comments on commit 88c63ea

Please sign in to comment.