728x90 반응형 colab2 Google Colab 파일 업로드 구글 Colab 파일 업로드 Colab에서 python 프로그래밍 중 파일을 업로드해 처리해야 할 경우 다음의 명령어를 사용하면 된다. from google.colab import files uploaded = files.upload() for fn in uploaded.keys(): print('User uploaded file "{name}" with length {length} bytes'.format( name=fn, length=len(uploaded[fn]))) 명령을 실행하고 파일을 선택하면 업로드를 수행하고 업로드된 파일 정보를 표시한다. 업로드된 파일은 왼쪽 상단의 파일 아이콘을 클릭하면 볼 수 있다. "sample.xlsx" 파일을 확인할 수 있다. 2022. 12. 17. Google Colab 패키지(Package) 영구적 설치 Google Colab 패키지(Package) 영구 설치 매번 실행할 때마다 패키지를 새로 설치하는게 너무 번거롭고 시간 소비가 심한것 같아서 영구적 설치를 적용했습니다. 아래 명령을 실행하면 /content/packages 심볼릭 링크를 생성하고 path 환경 변수에 경로를 추가합니다. 간단하게 말하면 /content/drive 에 패키지를 설치하면 실제 설치 경로는 /content/drive/My Drive/Colab Notebooks 에 설치됩니다. import os, sys from google.colab import drive drive.mount('/content/drive') pg_path = '/content/packages' os.symlink('/co.. 2021. 9. 25. 이전 1 다음 728x90 반응형