Explain How to create a series from a list, numpy array and dict?

 Explain How to create a series from a list, numpy array and dict?

import pandas as pd
import numpy as np

list = ["k","h","o","s","e"]
Dict = {"k": 1,"h" : 2,"o" : 3,"s" :5,"e" :4}
np = np.array(["k","h","o","s","e"])

print(pd.Series(list))
print("\n")

print(pd.Series(Dict))
print("\n")

print(pd.Series(np))

Comments

Popular posts from this blog

Python Tokens

Pie Chart , Donut Plot, Area plot