From 9d331166bf952d76cd874d64b9a498d939ea8b25 Mon Sep 17 00:00:00 2001 From: Keith Calise Date: Wed, 27 May 2015 08:03:06 -0400 Subject: [PATCH] most of normal mode --- By_month.ipynb | 773 +++++++++++++++++++++++++++++++++++++++++++++++ by_product.ipynb | 307 +++++++++++++++++++ 2 files changed, 1080 insertions(+) create mode 100644 By_month.ipynb create mode 100644 by_product.ipynb diff --git a/By_month.ipynb b/By_month.ipynb new file mode 100644 index 0000000..06138e1 --- /dev/null +++ b/By_month.ipynb @@ -0,0 +1,773 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import seaborn" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "UTF-8\r\n" + ] + } + ], + "source": [ + "!uchardet \"Consumer_Complaints.csv\"" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Complaint IDProductSub-productIssueSub-issueStateZIP codeSubmitted viaDate receivedDate sent to companyCompanyCompany responseTimely response?Consumer disputed?
01388734MortgageConventional adjustable mortgage (ARM)Loan servicing, payments, escrow accountNaNVA22204Web05/22/201505/22/2015Green Tree Servicing, LLCClosed with explanationYesNaN
11389303Consumer loanVehicle loanTaking out the loan or leaseNaNMO63304Web05/22/201505/22/2015Ally Financial Inc.In progressYesNaN
21389676Consumer loanVehicle leaseProblems when you are unable to payNaNFL33414Web05/22/201505/22/2015Ally Financial Inc.In progressYesNaN
31388406MortgageConventional fixed mortgageLoan servicing, payments, escrow accountNaNNC27615Web05/22/201505/22/2015Navy FCUIn progressYesNaN
41388470Consumer loanInstallment loanManaging the loan or leaseNaNMA1474Phone05/22/201505/22/2015Santander Bank USIn progressYesNaN
\n", + "
" + ], + "text/plain": [ + " Complaint ID Product Sub-product \\\n", + "0 1388734 Mortgage Conventional adjustable mortgage (ARM) \n", + "1 1389303 Consumer loan Vehicle loan \n", + "2 1389676 Consumer loan Vehicle lease \n", + "3 1388406 Mortgage Conventional fixed mortgage \n", + "4 1388470 Consumer loan Installment loan \n", + "\n", + " Issue Sub-issue State ZIP code \\\n", + "0 Loan servicing, payments, escrow account NaN VA 22204 \n", + "1 Taking out the loan or lease NaN MO 63304 \n", + "2 Problems when you are unable to pay NaN FL 33414 \n", + "3 Loan servicing, payments, escrow account NaN NC 27615 \n", + "4 Managing the loan or lease NaN MA 1474 \n", + "\n", + " Submitted via Date received Date sent to company Company \\\n", + "0 Web 05/22/2015 05/22/2015 Green Tree Servicing, LLC \n", + "1 Web 05/22/2015 05/22/2015 Ally Financial Inc. \n", + "2 Web 05/22/2015 05/22/2015 Ally Financial Inc. \n", + "3 Web 05/22/2015 05/22/2015 Navy FCU \n", + "4 Phone 05/22/2015 05/22/2015 Santander Bank US \n", + "\n", + " Company response Timely response? Consumer disputed? \n", + "0 Closed with explanation Yes NaN \n", + "1 In progress Yes NaN \n", + "2 In progress Yes NaN \n", + "3 In progress Yes NaN \n", + "4 In progress Yes NaN " + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "complaints = pd.read_csv(\"Consumer_Complaints.csv\", engine=\"python\")\n", + "complaints.head()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "0 05/22/2015\n", + "1 05/22/2015\n", + "2 05/22/2015\n", + "3 05/22/2015\n", + "4 05/22/2015\n", + "Name: Date received, dtype: object" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "complaints[\"Date received\"].head()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaints.index = pd.to_datetime(complaints.pop('Date received'), format='%m/%d/%Y')" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Complaint IDProductSub-productIssueSub-issueStateZIP codeSubmitted viaDate sent to companyCompanyCompany responseTimely response?Consumer disputed?
Date received
2015-05-221388734MortgageConventional adjustable mortgage (ARM)Loan servicing, payments, escrow accountNaNVA22204Web05/22/2015Green Tree Servicing, LLCClosed with explanationYesNaN
2015-05-221389303Consumer loanVehicle loanTaking out the loan or leaseNaNMO63304Web05/22/2015Ally Financial Inc.In progressYesNaN
2015-05-221389676Consumer loanVehicle leaseProblems when you are unable to payNaNFL33414Web05/22/2015Ally Financial Inc.In progressYesNaN
2015-05-221388406MortgageConventional fixed mortgageLoan servicing, payments, escrow accountNaNNC27615Web05/22/2015Navy FCUIn progressYesNaN
2015-05-221388470Consumer loanInstallment loanManaging the loan or leaseNaNMA1474Phone05/22/2015Santander Bank USIn progressYesNaN
\n", + "
" + ], + "text/plain": [ + " Complaint ID Product \\\n", + "Date received \n", + "2015-05-22 1388734 Mortgage \n", + "2015-05-22 1389303 Consumer loan \n", + "2015-05-22 1389676 Consumer loan \n", + "2015-05-22 1388406 Mortgage \n", + "2015-05-22 1388470 Consumer loan \n", + "\n", + " Sub-product \\\n", + "Date received \n", + "2015-05-22 Conventional adjustable mortgage (ARM) \n", + "2015-05-22 Vehicle loan \n", + "2015-05-22 Vehicle lease \n", + "2015-05-22 Conventional fixed mortgage \n", + "2015-05-22 Installment loan \n", + "\n", + " Issue Sub-issue State \\\n", + "Date received \n", + "2015-05-22 Loan servicing, payments, escrow account NaN VA \n", + "2015-05-22 Taking out the loan or lease NaN MO \n", + "2015-05-22 Problems when you are unable to pay NaN FL \n", + "2015-05-22 Loan servicing, payments, escrow account NaN NC \n", + "2015-05-22 Managing the loan or lease NaN MA \n", + "\n", + " ZIP code Submitted via Date sent to company \\\n", + "Date received \n", + "2015-05-22 22204 Web 05/22/2015 \n", + "2015-05-22 63304 Web 05/22/2015 \n", + "2015-05-22 33414 Web 05/22/2015 \n", + "2015-05-22 27615 Web 05/22/2015 \n", + "2015-05-22 1474 Phone 05/22/2015 \n", + "\n", + " Company Company response \\\n", + "Date received \n", + "2015-05-22 Green Tree Servicing, LLC Closed with explanation \n", + "2015-05-22 Ally Financial Inc. In progress \n", + "2015-05-22 Ally Financial Inc. In progress \n", + "2015-05-22 Navy FCU In progress \n", + "2015-05-22 Santander Bank US In progress \n", + "\n", + " Timely response? Consumer disputed? \n", + "Date received \n", + "2015-05-22 Yes NaN \n", + "2015-05-22 Yes NaN \n", + "2015-05-22 Yes NaN \n", + "2015-05-22 Yes NaN \n", + "2015-05-22 Yes NaN " + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "complaints.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Complaint IDProductSub-productIssueSub-issueStateZIP codeSubmitted viaDate sent to companyCompanyCompany responseTimely response?Consumer disputed?
Date received
2011-12-012352Credit cardNaNCredit determinationNaNNY13350Web12/05/2011Capital OneClosed without reliefYesYes
2011-12-012366Credit cardNaNCredit reportingNaNFL33415Referral12/06/2011CitibankClosed without reliefYesYes
2011-12-012368Credit cardNaNCredit line increase/decreaseNaNFL32792Web12/05/2011CitibankClosed without reliefYesNo
2011-12-012371Credit cardNaNOther feeNaNHI96813Web12/19/2011Capital OneClosed without reliefYesNo
2011-12-012374Credit cardNaNPayoff processNaNCA94108Phone12/05/2011Capital OneClosed without reliefYesYes
\n", + "
" + ], + "text/plain": [ + " Complaint ID Product Sub-product \\\n", + "Date received \n", + "2011-12-01 2352 Credit card NaN \n", + "2011-12-01 2366 Credit card NaN \n", + "2011-12-01 2368 Credit card NaN \n", + "2011-12-01 2371 Credit card NaN \n", + "2011-12-01 2374 Credit card NaN \n", + "\n", + " Issue Sub-issue State ZIP code \\\n", + "Date received \n", + "2011-12-01 Credit determination NaN NY 13350 \n", + "2011-12-01 Credit reporting NaN FL 33415 \n", + "2011-12-01 Credit line increase/decrease NaN FL 32792 \n", + "2011-12-01 Other fee NaN HI 96813 \n", + "2011-12-01 Payoff process NaN CA 94108 \n", + "\n", + " Submitted via Date sent to company Company \\\n", + "Date received \n", + "2011-12-01 Web 12/05/2011 Capital One \n", + "2011-12-01 Referral 12/06/2011 Citibank \n", + "2011-12-01 Web 12/05/2011 Citibank \n", + "2011-12-01 Web 12/19/2011 Capital One \n", + "2011-12-01 Phone 12/05/2011 Capital One \n", + "\n", + " Company response Timely response? Consumer disputed? \n", + "Date received \n", + "2011-12-01 Closed without relief Yes Yes \n", + "2011-12-01 Closed without relief Yes Yes \n", + "2011-12-01 Closed without relief Yes No \n", + "2011-12-01 Closed without relief Yes No \n", + "2011-12-01 Closed without relief Yes Yes " + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "complaints.tail()" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaints = complaints[[\"Product\", \"Company\",\"Company response\"]]" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ProductCompanyCompany response
Date received
2015-05-22MortgageGreen Tree Servicing, LLCClosed with explanation
2015-05-22Consumer loanAlly Financial Inc.In progress
2015-05-22Consumer loanAlly Financial Inc.In progress
2015-05-22MortgageNavy FCUIn progress
2015-05-22Consumer loanSantander Bank USIn progress
\n", + "
" + ], + "text/plain": [ + " Product Company \\\n", + "Date received \n", + "2015-05-22 Mortgage Green Tree Servicing, LLC \n", + "2015-05-22 Consumer loan Ally Financial Inc. \n", + "2015-05-22 Consumer loan Ally Financial Inc. \n", + "2015-05-22 Mortgage Navy FCU \n", + "2015-05-22 Consumer loan Santander Bank US \n", + "\n", + " Company response \n", + "Date received \n", + "2015-05-22 Closed with explanation \n", + "2015-05-22 In progress \n", + "2015-05-22 In progress \n", + "2015-05-22 In progress \n", + "2015-05-22 In progress " + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "complaints.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaint_graph = complaints.groupby(complaints.index).count().resample(\"M\")" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaint_graph= complaint_graph.fillna(0)" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "by_month = complaint_graph['Product'][:-1]" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "by_month.plot()\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "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.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/by_product.ipynb b/by_product.ipynb new file mode 100644 index 0000000..eb5e68f --- /dev/null +++ b/by_product.ipynb @@ -0,0 +1,307 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "complaint_product = pd.read_csv(\"Consumer_Complaints.csv\", engine='python')" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Complaint IDProductSub-productIssueSub-issueStateZIP codeSubmitted viaDate receivedDate sent to companyCompanyCompany responseTimely response?Consumer disputed?
01388734MortgageConventional adjustable mortgage (ARM)Loan servicing, payments, escrow accountNaNVA22204Web05/22/201505/22/2015Green Tree Servicing, LLCClosed with explanationYesNaN
11389303Consumer loanVehicle loanTaking out the loan or leaseNaNMO63304Web05/22/201505/22/2015Ally Financial Inc.In progressYesNaN
21389676Consumer loanVehicle leaseProblems when you are unable to payNaNFL33414Web05/22/201505/22/2015Ally Financial Inc.In progressYesNaN
31388406MortgageConventional fixed mortgageLoan servicing, payments, escrow accountNaNNC27615Web05/22/201505/22/2015Navy FCUIn progressYesNaN
41388470Consumer loanInstallment loanManaging the loan or leaseNaNMA1474Phone05/22/201505/22/2015Santander Bank USIn progressYesNaN
\n", + "
" + ], + "text/plain": [ + " Complaint ID Product Sub-product \\\n", + "0 1388734 Mortgage Conventional adjustable mortgage (ARM) \n", + "1 1389303 Consumer loan Vehicle loan \n", + "2 1389676 Consumer loan Vehicle lease \n", + "3 1388406 Mortgage Conventional fixed mortgage \n", + "4 1388470 Consumer loan Installment loan \n", + "\n", + " Issue Sub-issue State ZIP code \\\n", + "0 Loan servicing, payments, escrow account NaN VA 22204 \n", + "1 Taking out the loan or lease NaN MO 63304 \n", + "2 Problems when you are unable to pay NaN FL 33414 \n", + "3 Loan servicing, payments, escrow account NaN NC 27615 \n", + "4 Managing the loan or lease NaN MA 1474 \n", + "\n", + " Submitted via Date received Date sent to company Company \\\n", + "0 Web 05/22/2015 05/22/2015 Green Tree Servicing, LLC \n", + "1 Web 05/22/2015 05/22/2015 Ally Financial Inc. \n", + "2 Web 05/22/2015 05/22/2015 Ally Financial Inc. \n", + "3 Web 05/22/2015 05/22/2015 Navy FCU \n", + "4 Phone 05/22/2015 05/22/2015 Santander Bank US \n", + "\n", + " Company response Timely response? Consumer disputed? \n", + "0 Closed with explanation Yes NaN \n", + "1 In progress Yes NaN \n", + "2 In progress Yes NaN \n", + "3 In progress Yes NaN \n", + "4 In progress Yes NaN " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "complaint_product.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaint_by_product = complaint_product['Product'].value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaint_by_product.plot(kind=\"bar\")\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaint_by_company = complaint_product['Company'].value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "complaint_by_company[0:10].plot(kind=\"bar\")\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "company_response = complaint_product['Company response'].value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "company_response.plot(kind=\"bar\")\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "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.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}