Skip to content
Snippets Groups Projects
Commit b73a9a84 authored by ArktikHunter's avatar ArktikHunter
Browse files

silence pandas index constructor futurewarning

parent 95c822a5
No related branches found
No related tags found
1 merge request!21pydtn agkmeans and version 1.0
"""AGKmeans code."""
import pandas as pd
import networkx as nx
import warnings
__author__ = 'Fatemeh Zare<faz361@mail.usask.ca>'
"""
Advanced graph-based k-means is an appropriate algorithm for the datasets
......@@ -21,6 +22,7 @@ def agkmeans(graph, k):
index_list1 = []
for nodei in graph.nodes:
index_list1.append(nodei)
warnings.simplefilter("ignore", FutureWarning, lineno=6982) # catches pandas Index constructor warning
df_initial = pd.DataFrame(columns=['node', 'degree', 'centroid'],
index=index_list1)
df_initial = df_initial.reset_index(drop=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment