일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- matplotlib
- teen learn
- List Comprehension
- context manger1
- 준비
- Seaborn
- 시험 일정
- numpy
- 응시료
- 빅데이터 분석기사
- separating data(데이터 분리하기)
- 검정수수료
- pythonML
- K 데이터 자격시험
Archives
- Today
- Total
재원's 블로그
구글 코랩과 드라이브 연동하고 파일 불러오기 본문
최초 작성일 : 2021-11-06
categories: google colab
-구글 드라이브와 연동하기
from google.colab import drive
drive.mount('/content/drive')
<결과 화면>
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
-파일 불러오기
#DATA_PATH = "경로를 입력하시기를 바랍니다."
# 필자의 경로는 다음과 같았습니다.
DATA_PATH = '/content/drive/MyDrive/Colab Notebooks/lectures_210923/PART_I_Intro/data/Lemonade2016.csv'
lemonade = pd.read_csv(DATA_PATH)
lemonade.info()
<결과 화면>
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 32 entries, 0 to 31
Data columns (total 7 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Date 31 non-null object
1 Location 32 non-null object
2 Lemon 32 non-null int64
3 Orange 32 non-null int64
4 Temperature 32 non-null int64
5 Leaflets 31 non-null float64
6 Price 32 non-null float64
dtypes: float64(2), int64(3), object(2)
memory usage: 1.9+ KB