Spaces:
Runtime error
Runtime error
hacpdsae2023
commited on
Commit
•
b4efb6d
1
Parent(s):
41e3ceb
fix syntax on the dataframe
Browse files
app.py
CHANGED
@@ -114,5 +114,5 @@ 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)
|
|
|
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([list(d_lc.keys()),list(d_lc.values())]),columns=['node','laplacian centrality'])
|
118 |
st.bar_chart(df_lc)
|