{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 1\n", "Import the NumPy library under the alias `np` and import the pandas library under the alias `pd`." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 2\n", "Turn the variable `this_list` into a pandas Series. Name the Series `this_series`." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "this_list = ['a', 'b', 'c']" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "#Solution goes here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 3\n", "Given the variable `labels`, overwirte the `this_series` variable you just created with a new version of `this_series` that has `labels` as its index." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "labels = ['first', 'second', 'third']" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "#Solution goes here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Problem 4\n", "Given the dictionary `new_dict`, turn it into a pandas Seris named `new_series`." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "new_dict = {\"brand\": \"Ford\",\"model\": \"Mustang\",\"year\": 1964}" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "#Solution goes here" ] } ], "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 }