(c) 2016 - present. Enplus Advisors, Inc.
import numpy as np
import pandas as pd
Exercise:
Series
and assign it to s1a
from the integers 8, 6, 7, 5dict
, create an integer Series
and assign it to s1b
with values 8, 6, 7, 5 named s1b
and a string index 'a', 'b', 'c', and 'd's1b
values to 64-bit floating point values and assign it to s1c
s1c
as a PandasArray
Exercise:
s2
using integer based lookup (iloc
).s2
using label indexing (loc
).s2
using a boolean Series
s2 = pd.Series([6, 8, 7, 5], index=list('abcd'), dtype='Int64')
Exercise
s3
s2
and s3
together be?
Figure it out on paper then check in the notebook with s2 + s3
s3 = pd.Series([9., 100., np.nan], index=list('ayz'), dtype='Int64')