KnowledgeBoat Logo

Informatics Practices

Complete the given Python code to get the required output (ignore the dtype attribute) as

Output:

Tamil Nadu       Chennai   
Uttar Pradesh    Lucknow   
Manipur           Imphal   

Code:

import _______ as pd 
data = ['Chennai','_______','Imphal'] 
indx = ['Tamil Nadu','Uttar Pradesh','Manipur'] 
s = pd.Series(_______, indx) 
print(_______) 

Python Pandas

1 Like

Answer

import pandas as pd 
data = ['Chennai', 'Lucknow', 'Imphal'] 
indx = ['Tamil Nadu','Uttar Pradesh','Manipur'] 
s = pd.Series(data, indx) 
print(s)

Answered By

2 Likes


Related Questions