Updating scripts.

This commit is contained in:
Daniel Lemire 2019-01-17 19:40:38 -05:00
parent cb02143c2f
commit 9bfc0a816f
2 changed files with 16 additions and 1 deletions

View File

@ -14,6 +14,8 @@ def getdata(filename):
ourdir=os.path.dirname(os.path.realpath(__file__))
answer = []
for file in os.listdir(ourdir):
if file.startswith("all"):
continue
if file.endswith(".table"):
fullpath = os.path.join(ourdir, file)
answer.append([file[:-11]]+getdata(fullpath))
@ -21,3 +23,6 @@ print("#simdjson RapidJSON sajson")
answer.sort()
for l in answer:
print("\t".join(map(str,l)))

View File

@ -1,6 +1,11 @@
import os
import csv
import pandas as pd
try: import pandas as pd
except ImportError:
import pip
pip.main(['install', '--user', 'pandas'])
import pandas as pd
def getdata(filename):
df = pd.read_csv(filename, delim_whitespace=True)
@ -9,6 +14,8 @@ def getdata(filename):
ourdir=os.path.dirname(os.path.realpath(__file__))
answer = []
for file in os.listdir(ourdir):
if file.startswith("all"):
continue
if file.endswith(".table"):
fullpath = os.path.join(ourdir, file)
answer.append([file[:-11]]+getdata(fullpath))
@ -16,3 +23,6 @@ print("#simdjson RapidJSON sajson")
answer.sort()
for l in answer:
print("\t".join(map(str,l)))