Last changed

This commit is contained in:
bs
2022-05-27 10:48:40 +02:00
parent 415ec6471e
commit 977b00d378
3 changed files with 30 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import json
import os
import zipfile
from io import BytesIO
import pandas as pd
def addOneAthlete(df, file):
data = json.load(file)
df = df.append(data, ignore_index=True)
return df
def create_pcikle():
df = pd.DataFrame()
with zipfile.ZipFile('download.zip') as z:
for filename in z.namelist():
if filename.endswith('.zip'):
zfiledata = BytesIO(z.read(filename))
with zipfile.ZipFile(zfiledata) as zfile2:
for name2 in zfile2.namelist():
with zfile2.open(name2) as f:
df = addOneAthlete(df, f)
df.to_pickle('data.pkl')
if __name__ == '__main__':
data = pd.read_pickle('data.pkl')
print('x')
BIN
View File
Binary file not shown.
Binary file not shown.