{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Evaluating data from a form\n", "\n", "A client has been testing a small form as below to gather some basic data about their client-base. They have brought their findings to you to validate the data they have gathered. \n", "\n", "You have been provided a dataset of csv records that contain entries from the form as well as some basic visualizations.The client pointed out that some of the visualizations look incorrect but they're unsure about how to resolve them.\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", " \n", " \n", " \n", " Entry Form\n", "\n", "\n", "\n", "

Please Fill out the Form (* required)

\n", " *
\n", "
\n", " \n", "
\n", " \n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "\n", "\n", "\n", "\n", "\n", " \n", " \n", " \n", " Entry Form\n", "\n", "\n", "\n", "

Please Fill out the Form (* required)

\n", " *
\n", "
\n", " \n", "
\n", " \n", "\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Instructions\n", "\n", "Use the techniques in this section to make recommendations about the form so it captures accurate and consistent information. " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "kernelOptions": { "path": "./open-machine-learning-jupyter-book/" } }, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "\n", "#Loading the dataset\n", "path = '../../assets/data/simple-form.csv'\n", "form_df = pd.read_csv(path)\n", "print(form_df)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "form_df['state'].value_counts().plot(kind='bar');\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "form_df['birth_month'].value_counts().plot(kind='bar');\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Acknowledgments\n", "\n", "Thanks to Microsoft for creating the open-source course [Data Science for Beginners](https://github.com/microsoft/Data-Science-For-Beginners). It inspires the majority of the content in this chapter." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.13 64-bit", "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.9.13" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" } } }, "nbformat": 4, "nbformat_minor": 2 }