download dataset from python script
This commit is contained in:
commit
7f6b16743e
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
df_atp.csv
|
||||||
|
df_wta.csv
|
||||||
|
atp-and-wta-tennis-data.zip
|
10
init.py
Normal file
10
init.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import subprocess
|
||||||
|
from os.path import exists
|
||||||
|
|
||||||
|
file_exists = exists('./df_atp.csv')
|
||||||
|
|
||||||
|
if not file_exists:
|
||||||
|
subprocess.run(["pip", "install", "--user", "kaggle"])
|
||||||
|
subprocess.run(["pip", "install", "--user","pandas"])
|
||||||
|
subprocess.run(["kaggle", "datasets", "download", "-d", "hakeem/atp-and-wta-tennis-data"])
|
||||||
|
subprocess.run(["unzip", "-o", "atp-and-wta-tennis-data.zip"])
|
Loading…
Reference in New Issue
Block a user