Skip to content

Commit

Permalink
Change to panda default csv reader
Browse files Browse the repository at this point in the history
  • Loading branch information
sameeravithana committed Jun 25, 2017
1 parent 8a82437 commit 49ac56f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
7 changes: 2 additions & 5 deletions bellydynamic-adv/TemporalGraph.py
Expand Up @@ -2,7 +2,6 @@

sys.path.append("../bellydynamic-util/")

import csv_io
import pandas as pd

import MultiGraph as MG
Expand All @@ -22,9 +21,7 @@
## Edge level attributes
EdgeA = EdgeA.EdgeAttribute(G)

data_matrix = csv_io.read_data(filename, " ", 0)

df = pd.DataFrame(data_matrix, columns=('src', 'dst', 'timestamp'))
df = pd.read_csv(filename, sep=' ')

##### init edge attributes
attribute_type = 1
Expand All @@ -45,4 +42,4 @@
# graph.walkNodes()
# graph.walkEdges()

EdgeA.walkGraphEdgeAttributes(attribute_type, attribute_name)
# EdgeA.walkGraphEdgeAttributes(attribute_type, attribute_name)
1 change: 1 addition & 0 deletions bellydynamic-data/CollegeMsg.txt
@@ -1,3 +1,4 @@
src dst timestamp
1 2 1082040961
3 4 1082155839
5 2 1082414391
Expand Down
10 changes: 0 additions & 10 deletions bellydynamic-util/csv_io.py

This file was deleted.

0 comments on commit 49ac56f

Please sign in to comment.