base_path = "data" file_name = "petition.csv" url ='https://drive.google.com/open?id=1d8VEAj6n83wT1YRlCrhoU_1mMSvYpXc4' def file_exist_check(base_path, file_name): if os.path.exists(f"./{file_name}"): print(f"{os.getcwd()}/{base_path} 경로에 파일이 있음") return if not os.path.exists(base_path): os.makedirs(base_path) if platform.system() == "Linux": # 구글 드라이브에서 csv 파일을 읽어 오기 위해 gauth 인증하기 !pip install -U -q PyDrive from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from google.colab import auth from oauth2client.client import GoogleCredentials auth.authenticate_user() gauth = GoogleAuth() gauth.credentials = GoogleCredentials.get_application_default() drive = GoogleDrive(gauth)