Import NumPy under the alias np
.
Import pandas under the alias pd
.
Given the DataFrame data
, remove all of its rows that contain null values using the pandas method discussed in the lesson.
data = pd.DataFrame(np.array([[np.nan, 8, 12],[np.nan, 16, np.nan],[4, 13, 45]]))
#Solution goes here
Given the DataFrame data
, remove all of its columns that contain null values using the pandas method discussed in the lesson.
#Solution goes here
Given the DataFrame data
, replace all of its null values with 💩
(copy and paste it).
Given the DataFrame data
, replace all of its null values with the mean value across the entire DataFrame.