Advertisements
Advertisements
Question
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(_______)
Code Writing
Solution
import pandas as pd
data = ['Chennai', 'Lucknow', 'Imphal']
indx = ['Tamil Nadu','Uttar Pradesh','Manipur']
s = pd.Series(data, indx)
print(s)
shaalaa.com
Is there an error in this question or solution?