Skip to content

Commit 4911389

Browse files
authored
Replace pandas.read_table with read_csv
Merges #5 pandas.read_table deprecated in pandas v0.24 https://pandas.pydata.org/pandas-docs/version/0.24/whatsnew/v0.24.0.html#deprecations
1 parent fe68dab commit 4911389

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

hetmatpy/degree_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ def dwpc_to_degrees(graph, metapath, damping=0.5, ignore_zeros=False):
7878
del source_adj_mat, target_adj_mat
7979

8080
source_path = graph.get_nodes_path(metapath.source(), file_format='tsv')
81-
source_node_df = pandas.read_table(source_path)
81+
source_node_df = pandas.read_csv(source_path, sep='\t')
8282
source_node_names = list(source_node_df['name'])
8383

8484
target_path = graph.get_nodes_path(metapath.target(), file_format='tsv')
85-
target_node_df = pandas.read_table(target_path)
85+
target_node_df = pandas.read_csv(target_path, sep='\t')
8686
target_node_names = list(target_node_df['name'])
8787

8888
row_names, col_names, dwpc_matrix = graph.read_path_counts(metapath, 'dwpc', damping)

hetmatpy/hetmat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def get_node_identifiers(self, metanode):
366366
Returns a list of node identifiers for a metapath
367367
"""
368368
path = self.get_nodes_path(metanode, file_format='tsv')
369-
node_df = pandas.read_table(path)
369+
node_df = pandas.read_csv(path, sep='\t')
370370
return list(node_df['identifier'])
371371

372372
@functools.lru_cache()

hetmatpy/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def combine_dwpc_dgp(graph, metapath, damping, ignore_zeros=False, max_p_value=1
3838
Includes gamma-hurdle significance estimates.
3939
"""
4040
stats_path = graph.get_running_degree_group_path(metapath, 'dwpc', damping, extension='.tsv.gz')
41-
dgp_df = pandas.read_table(stats_path)
41+
dgp_df = pandas.read_csv(stats_path, sep='\t')
4242
dgp_df = add_gamma_hurdle_to_dgp_df(dgp_df)
4343
degrees_to_dgp = dgp_df.set_index(['source_degree', 'target_degree']).to_dict(orient='index')
4444
dwpc_row_generator = hetmatpy.degree_group.dwpc_to_degrees(

0 commit comments

Comments
 (0)