z12 = pd.Series([1.1, 2.2, 3.3, 4.4, 5.5], ['e', 'd', 'c', 'b', 'a']);z14 = pd.Series(zdata1, index=season14); # 이 순서대로 새로 정렬쉼표로 구분 된 값
pd.read_csv('lasvegas.csv')
scientists.loc['William Gosset', 'Occupation'] # 특정 행과 열 선택
# df.loc['index_label', 'column_label']scientists.iloc[2, 0]
# df.iloc[row_index, column_index]manual_bool_values = [True, True, False, False, True, True, False, False]scientists = pd.DataFrame(
data={'Occupation': ['Chemist', 'Statistician'],
'Born': ['1920-07-25', '1876-06-13'],
'Died': ['1958-04-16', '1937-10-16'],
'Age': [37, 61]},
index=['Rosaline Franklin', 'William Gosset'],
columns=['Occupation', 'Born', 'Died', 'Age'])df21 = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list('ABCD'))print('\n PD27 \n', df22.T, '\n')datetime 객체로 변환하는 함수scientists.sample(frac=1).reset_index(drop=True)columns=list(df31.columns) + ['E']df51.sub(s51, axis='index')axis='index'는 행 기준으로 연산을 수행하도록 지정df51의 각 행에서 동일한 인덱스를 가진 s51의 값을 뺌NaN이면 결과도 NaN이 됨