Handle empty graphs properly
Sentry Issue: SADCOLLECT-1A
KeyError: 'weight'
(2 additional frame(s) were not displayed)
...
File "spikexplore/graph_explore.py", line 28, in explore
nodes_list, nodes_df, edges_df, nodes_info = spiky_ball(initial_nodes,
File "spikexplore/collect_edges.py", line 160, in spiky_ball
total_edges_df = total_edges_df.sort_values('weight', ascending=False)
File "pandas/util/_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "pandas/core/frame.py", line 6901, in sort_values
k = self._get_label_or_level_values(by, axis=axis)
File "pandas/core/generic.py", line 1850, in _get_label_or_level_values
raise KeyError(key)