Problem 1

Import NumPy under the alias np.

In [ ]:
 

Problem 2

Import pandas under the alias pd.

In [ ]:
 

Problem 3

Given the following NumPy array data, create a pandas DataFrame named first_data_frame that contains the same elements. Print the DataFrame to make sure the operation executed successfully.

In [ ]:
data = np.round(np.random.randn(5,5),1)
In [ ]:
#Solution goes here

Problem 4

Assign the values of row_labels to the index of first_data_frame. Print the DataFrame to make sure the operation executed successfully.

Hint: It will be easier to overwrite first_data_frame by using another pd.DataFrame method.

In [ ]:
row_labels = ['one','two','three','four','five']
In [ ]:
#Solution goes here

Problem 5

Assign the values of column_labels to the columns of first_data_frame. Note that there are two main ways to do this - you are free to chose the method of your choice. Print the DataFrame to make sure the operation executed successfully.

In [ ]:
column_labels = ['alpha','beta','charlie','delta','echo']
In [ ]:
#Solution goes here

Problem 6

Create a pandas Series named my_series that contains the values from row alpha of first_data_frame. Print my_series to make sure the operation executed successfully.

In [ ]:
#Solution goes here

Problem 7

Create a new DataFrame called second_data_frame that is equal to first_data_frame but without row one. Print second_data_frame to make sure the operation executed successfully.

In [ ]:
#Solution goes here

Problem 8

Create a new DataFrame called third_data_frame that is equal to second_data_frame, but without row charlie. Print third_data_frame to make sure the operation executed successfully.

In [ ]:
#Solution goes here

Problem 9

Create a variable called row_two that is equal to row two from third_data_frame. Print row_two to make sure the operation executed successfully.

In [ ]:
#Solution goes here

Problem 10

Print the shape of new_data.

In [ ]:
new_data = np.round(np.random.randn(5,5),1)
In [ ]:
#Solution goes here

Problem 11

Print a DataFrame that contains boolean values that indicate whether the elements of new_data are greater than 1.

In [ ]:
#Solution goes here

Problem 12

Print a NumPy array that contains only the elements of new_data that are greater than 1.

In [ ]:
#Solution goes here