Draw Date가 0번 column에 있으니, index_col=0

import pandas as pd

df = pd.read_csv('data/mega_millions.csv', index_col=0)
df # 테스트 코드

몇 번째 Column인지 명확하지 않을 때는 숫자 0 대신 index_col='Draw Date' 칼럼 이름 직접입력

import pandas as pd

df = pd.read_csv('data/mega_millions.csv', index_col='Draw Date')
df # 테스트 코드

+ Recent posts