Spaces:
Runtime error
Runtime error
hacpdsae2023
commited on
Commit
·
60e7380
1
Parent(s):
f1262ae
creating data frame directly from key, value list
Browse files
app.py
CHANGED
@@ -112,6 +112,7 @@ return_value = agraph(nodes=nodes,
|
|
112 |
st.markdown('The Laplacian centrality is a measure of closeness')
|
113 |
st.write(str(nx.laplacian_centrality(G)))
|
114 |
d_lc = nx.laplacian_centrality(G)
|
115 |
-
st.write(d_lc[0])
|
116 |
-
df_lc = pd.DataFrame.from_dict(nx.laplacian_centrality(G))
|
|
|
117 |
st.bar_chart(df_lc)
|
|
|
112 |
st.markdown('The Laplacian centrality is a measure of closeness')
|
113 |
st.write(str(nx.laplacian_centrality(G)))
|
114 |
d_lc = nx.laplacian_centrality(G)
|
115 |
+
#st.write(d_lc[0])
|
116 |
+
#df_lc = pd.DataFrame.from_dict(nx.laplacian_centrality(G))
|
117 |
+
df_lc = pd.DataFrame(np.transpose([d_lc.keys(),d_lc.values()],columns=['node','laplacian centrality']))
|
118 |
st.bar_chart(df_lc)
|