{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 1\n", "Import NumPy under the alias `np`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 2\n", "Import pandas under the alias `pd`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 3\n", "Given the DataFrame `data`, remove all of its rows that contain null values using the pandas method discussed in the lesson." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "data = pd.DataFrame(np.array([[np.nan, 8, 12],[np.nan, 16, np.nan],[4, 13, 45]]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Solution goes here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 4\n", "Given the DataFrame `data`, remove all of its columns that contain null values using the pandas method discussed in the lesson." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#Solution goes here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 5\n", "Given the DataFrame `data`, replace all of its null values with `💩` (copy and paste it)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 6\n", "Given the DataFrame `data`, replace all of its null values with the mean value across the entire DataFrame." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" } }, "nbformat": 4, "nbformat_minor": 4 }