Data Analytics with python/[Data Analysis]
[Pandas][Series]S1_03_A Dictionary: 사전 정의
보끔밥0130
2023. 1. 17. 14:35
728x90
In [1]:
import pandas as pd
A Dictionary: A collection of key-value pairs
In [2]:
dict1 = {'Client ID' : 101,
'Client Name' : 'David',
'Net worth [$]' : 1500,
'Years' : 12}
In [3]:
# Show
dict1
Out[3]:
{'Client ID': 101, 'Client Name': 'David', 'Net worth [$]': 1500, 'Years': 12}
In [4]:
# datatype
type(dict1)
Out[4]:
dict
In [5]:
s1 = pd.Series(dict1); s1
Out[5]:
Client ID 101
Client Name David
Net worth [$] 1500
Years 12
dtype: object
728x90