Skip to content

Commit

Permalink
Updated csv2json utility
Browse files Browse the repository at this point in the history
anish03 committed Oct 4, 2018
1 parent d12dd3d commit f31cc17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions csv2json/csv2json.py
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
import numpy as np
import time

def main():
df = pd.read_csv('yelp_business.csv')
def csv2json(csv_file):
df = pd.read_csv(csv_file)
print len(df)
h1 = h = list(df.columns.values)

@@ -34,5 +34,9 @@ def main():
target.write(rec+'\n')
target.close()

def main():
csv_file = sys.argv[1]
csv2json(csv_file)

if __name__ == '__main__':
main()

0 comments on commit f31cc17

Please sign in to comment.