WGU D191 Advanced Data Management Final
Exam || With 100% Accurate Solutions
Conceptial Researchers
conceptialresearch@gmail.com
2024
, WGU D191 Advanced Data
Management Final Exam || With 100%
Accurate Solutions
indA = pd.Index([1, 3, 5, 7, 9])
indB = pd.Index([2, 3, 5, 7, 11])
indA | indB # union
- Int64Index([1, 2, 9, 11], dtype='int64')
- Int64Index([3, 6, 10, 14, 20], dtype='int64')
- Int64Index([3, 5, 7], dtype='int64')
- Int64Index([1, 2, 3, 5, 7, 9, 11], dtype='int64') - ANSWER - Int64Index([1, 2, 3, 5, 7,
9, 11], dtype='int64')
data = pd.Series([0.25, 0.5, 0.75, 1.0], index=['a', 'b', 'c', 'd'])
data[0:2] - ANSWER - a 0.25
b 0.50
dtype: float64
consider the DataFrame data
columns = area, pop
rows = California, Florida, Illinois, New York, Texas
to get the population of California
- data.pop['California']
- data['California'].pop
- data['pop'].loc['California']
- data.loc['pop']['California'] - ANSWER - data['pop'].loc['California']
consider the DataFrame data
columns = area, pop
rows = California, Florida, Illinois, New York, Texas
- data.Texas.area
- data.iloc[-1,0]
- data.iloc[0,-1]
- data.iloc['area', 'Texas'] - ANSWER - - data.iloc[-1,0]
data = pd.Series(['a', 'b', 'c'], index=[1, 3, 5])
data.iloc[1]
- 'b'
- 'c'
- 'a'
- error - ANSWER - 'b'