[Pandas] (2022) 기본 기능 정리 (Object creation, Viewing data, Selection)


[Pandas] (2022) 기본 기능 정리 (Object creation, Viewing data, Selection)

Object creation, Viewing data, Selection. import numpy as np import pandas as pd 객체 생성 Series 생성: s = pd.Series([1, 3, 5, np.nan, 6, 8]) s Out[4]: 0 1.0 1 3.0 2 5.0 3 NaN 4 6.0 5 8.0 dtype: float64 날짜/시간 인덱스와 레이블이 지정된 열이 있는 NumPy 배열을 전달하여 DataFrame 만들기: dates = pd.date_range("20130101", periods=6) dates Out[6]: DatetimeIndex(['2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06'], dtype='datetime64[ns]', freq='D') df = pd.DataFrame(np.random.randn(6, 4), index=dates,...


#pandas #객체생성 #데이터뷰 #선택

원문링크 : [Pandas] (2022) 기본 기능 정리 (Object creation, Viewing data, Selection)