[python]Pandasライブラリ-(1)
5585 ワード
Pandasの作成
import pandas as pd
#pandas 라이브러리를 불러와서 pd라고 부르겠다.
シリーズの作成(リスト)
pd.Series([9904312, 3448737, 2890451, 2466052],
index=['서울', '부산', '인천', '대구'])

シリアルデータの検証

シリーズ名の指定
population.name = '인구'
population.index.name = '도시'

索引とスライド
#인덱싱
population[0]
population['대구']
#슬라이싱
population[ 1 : 3 ]
population['부산': '인천']
ブール索引
population >= 2500000

population[ population >= 2500000 ]

シリーズの作成(ディックシリーズ)
data = {'서울': 9631482,
'부산': 3393191,
'인천': 2632035,
'대전': 1490158}
population2 = pd.Series(data)

シリアルデータの変更
rs['대구'] = 1.41
del rs['대전']
rs['광주'] = 2.13
Reference
この問題について([python]Pandasライブラリ-(1)), 我々は、より多くの情報をここで見つけました https://velog.io/@nanana/Pandas-라이브러리テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol