Skip to content

Commit

Permalink
Replace pandas.read_table with read_csv
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel authored Jan 29, 2019
1 parent fe68dab commit 4911389
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hetmatpy/degree_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ def dwpc_to_degrees(graph, metapath, damping=0.5, ignore_zeros=False):
del source_adj_mat, target_adj_mat

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

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

row_names, col_names, dwpc_matrix = graph.read_path_counts(metapath, 'dwpc', damping)
Expand Down
2 changes: 1 addition & 1 deletion hetmatpy/hetmat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def get_node_identifiers(self, metanode):
Returns a list of node identifiers for a metapath
"""
path = self.get_nodes_path(metanode, file_format='tsv')
node_df = pandas.read_table(path)
node_df = pandas.read_csv(path, sep='\t')
return list(node_df['identifier'])

@functools.lru_cache()
Expand Down
2 changes: 1 addition & 1 deletion hetmatpy/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def combine_dwpc_dgp(graph, metapath, damping, ignore_zeros=False, max_p_value=1
Includes gamma-hurdle significance estimates.
"""
stats_path = graph.get_running_degree_group_path(metapath, 'dwpc', damping, extension='.tsv.gz')
dgp_df = pandas.read_table(stats_path)
dgp_df = pandas.read_csv(stats_path, sep='\t')
dgp_df = add_gamma_hurdle_to_dgp_df(dgp_df)
degrees_to_dgp = dgp_df.set_index(['source_degree', 'target_degree']).to_dict(orient='index')
dwpc_row_generator = hetmatpy.degree_group.dwpc_to_degrees(
Expand Down

0 comments on commit 4911389

Please sign in to comment.