commit 7f6b16743e37c54586f35923614012bd65f6825f Author: Wirusik Date: Sun Mar 20 18:12:59 2022 +0100 download dataset from python script diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1521a29 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +df_atp.csv +df_wta.csv +atp-and-wta-tennis-data.zip \ No newline at end of file diff --git a/init.py b/init.py new file mode 100644 index 0000000..46bf6bf --- /dev/null +++ b/init.py @@ -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"]) \ No newline at end of file