Problem 1

Import NumPy under the alias np.

In [ ]:
 

Problem 2

Import pandas under the alias pd.

In [ ]:
 

Problem 3

Given the pandas Series my_series, generate a NumPy array that contains only the unique values from my_series. Assign this new array to a variable called my_array. Print my_array to ensure that the operation has been executed successfully.

In [ ]:
my_series = pd.Series([1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9])
my_series
In [ ]:
#Solution goes here

Problem 4

Given the pandas DataFrame my_data_frame, generate a NumPy array that contains only the unique values from the second column. Assign this new array to a variable called another_array. Print another_array to ensure the operation has been executed successfully.

In [ ]:
my_data_frame = pd.DataFrame(np.random.randn(3,5))
my_data_frame
In [ ]:
#Solution goes here

Problem 5

Count the occurence of every element within the my_series variable that was created earlier in these practice problems.

In [ ]:
 

Problem 6

Given the function triple_digit, apply this to every element within my_series.

In [ ]:
def triple_digit(x):
    return x + x*10 + x*100
In [ ]:
#Solution goes here

Problem 7

Sort the my_data_frame variable that we created earlier based on the contents of its second column.

In [ ]: