30 July 2020
Code
# Import library
import pandas as pd
# Create a dictionary
x_dict = {'a': 1, 'b': 2, 'c': [1,2]}
# Create a Series
x = pd.Series(x_dict)
# Output
print(x)
print(type(x))
Output
a 1
b 2
c [1, 2]
dtype: object
<class 'pandas.core.series.Series'>
Any errors in code above?
Please send a message.