Informatics Practices
Why does following code cause error ?
s1 = pd.Series(range(1, 15, 3), index = list('ababa'))
print(s1['ab'])
Related Questions
Find the Error :
data = np.array(['a', 'b', 'c', 'd', 'e', 'f']) s = pd.Series(data, index = [100, 101, 102, 103, 104, 105]) print(s[102, 103, 104] )Can you correct the error ?
Why does following code cause error ?
s1 = pd.Series(range(1, 15, 3), index = list('abcd'))If Ser is a Series type object having 30 values, then how are statements (a), (b) and (c), (d) similar and different ?
(a) print(Ser.head())
(b) print(Ser.head(8))
(c) print(Ser.tail())
(d) print(Ser.tail(11))
What advantages does dataframe offer over series data structure ? If you have similar data stored in multiple series and a single dataframe, which one would you prefer and why ?