Skip to content

Commit

Permalink
cn_table_from_connectors: remove empty rows
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Jun 27, 2018
1 parent 3a044cf commit 1fa605c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymaid/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ def cn_table_from_connectors(x, remote_instance=None):
cn_table['neuron_name'] = [names[str(s)] for s in cn_table.skeleton_id.values]
cn_table['total'] = cn_table[x.skeleton_id].sum(axis=1)

# Drop rows with 0 synapses (e.g. if neuron is only up- but not downstream)
cn_table = cn_table[cn_table.total > 0]

# Sort by number of synapses
cn_table = cn_table.sort_values(['relation', 'total'], ascending=False)

Expand Down

0 comments on commit 1fa605c

Please sign in to comment.