create a pandas series from a dictionary of values and an narray
Answers
Answered by
2
Answer:
import numpy as np.
import pandas as pd.
a=pd.Series(data=[1,2,3,np.NaN])
b=pd.Series(data=[4.9,8.2,5.6],index=['x','y','z'])
c=pd.Series()
print(a.empty,b.empty,c.empty)
print(a.hasnans,b.hasnans,c.hasnans)
print(len(a),len(b))
Similar questions
India Languages,
8 days ago
Math,
17 days ago
Math,
9 months ago
Math,
9 months ago
English,
9 months ago