Both Ends Included
import pandas as pd
s = pd.Series(list("abcde"), index=[0, 3, 2, 5, 4])
print(list(s.loc[3:5]))
print(list(s.iloc[3:5]))
What are the two printed lines?
Sign in to answer questions and track your progress
Sign Inimport pandas as pd
s = pd.Series(list("abcde"), index=[0, 3, 2, 5, 4])
print(list(s.loc[3:5]))
print(list(s.iloc[3:5]))
What are the two printed lines?
Sign in to answer questions and track your progress
Sign In