Note
Pandas (36) 본문
728x90
How to import only specified columns from a csv file?
df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/BostonHousing.csv', usecols=['crim', 'medv'])
print(df.head())
# output
crim medv
0 0.00632 24.0
1 0.02731 21.6
2 0.02729 34.7
3 0.03237 33.4
4 0.06905 36.2
'Pandas' 카테고리의 다른 글
Pandas (38) (0) | 2022.08.30 |
---|---|
Pandas (37) (0) | 2022.08.29 |
Pandas (35) (0) | 2022.08.27 |
Pandas (34) (0) | 2022.08.26 |
Pandas (33) (0) | 2022.08.25 |
Comments