딥러닝 모델 설계/Python 공통
google colaboratory, 원격 < - > 로컬 파일입출력, interective plot
hellobird
2019. 7. 1. 15:15
1 2 3 4 5 6 | # 설치된 파이썬 패키지 import pip pip.get_installed_distributions() # 추가 패키지 설치 ! pip install pandas_datareader | cs |
csv 읽기
1 2 3 4 5 6 7 8 9 10 11 | 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]))) #read_csv() : 데이터 파일 불러오기 import pandas as pd import io df = pd.read_csv(io.StringIO(uploaded['test_csv_file.csv'].decode('utf-8'))) print(df) | cs |
csv 쓰기
from google.colab import files
df2.to_csv("df2.csv")
files.download('df2.csv')
https://stackoverflow.com/questions/51119951/interactive-graph-in-colab