Write the statement to get NewDelhi as output using positional index. import pandas as pd S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'], index=['India', 'USA', 'UK', 'France'])

Question:
Write the statement to get NewDelhi as output using positional index.
import pandas as pd
S1 = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'], 
index=['India', 'USA', 'UK', 'France'])

1.print(S1[0])

2. print(S1[‘India’])

3.Both of the above

4.print(S1.India)

Posted Date:-2021-12-13 05:55:15


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!