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"])