Skip to content

Instantly share code, notes, and snippets.

@iambibhas
Created December 3, 2014 17:33
Show Gist options
  • Select an option

  • Save iambibhas/c9b9764a1a3c38992454 to your computer and use it in GitHub Desktop.

Select an option

Save iambibhas/c9b9764a1a3c38992454 to your computer and use it in GitHub Desktop.
Assesment Anomaly
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "Assesment data"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": "import pandas as pd\npretest = pd.read_csv('/home/bibhas/Downloads/anganwadi_bangalore_pretest_2011-12.csv', delimiter='|')\n# posttest = pd.read_csv('/home/bibhas/Downloads/anganwadi_bangalore_posttest_2011-12.csv')",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 24
},
{
"cell_type": "code",
"collapsed": false,
"input": "pretest['1'].unique()",
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 25,
"text": "array([1, 0, 99, '1', '0', ' 1 +', '99'], dtype=object)"
}
],
"prompt_number": 25
},
{
"cell_type": "code",
"collapsed": false,
"input": "pretest['5'].unique()",
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 26,
"text": "array([1, 0, 99, '1', '0', ' 1 +'], dtype=object)"
}
],
"prompt_number": 26
},
{
"cell_type": "code",
"collapsed": false,
"input": "pretest[pretest['1'] == ' 1 +']",
"language": "python",
"metadata": {},
"outputs": [
{
"html": "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>DIST</th>\n <th>PROJECT</th>\n <th>CIRCLE</th>\n <th>SCODE</th>\n <th>SNAME</th>\n <th>STYPE</th>\n <th>STUID</th>\n <th>CSEX</th>\n <th>DOB</th>\n <th>CLANG</th>\n <th>PROGNAME</th>\n <th>ASSMNTNAME</th>\n <th>1</th>\n <th>2</th>\n <th>3</th>\n <th>4</th>\n <th>5</th>\n <th>6</th>\n <th>7</th>\n <th>8</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>23401</th>\n <td> bangalore </td>\n <td> bangalore south(banashankari) </td>\n <td> thavare kere </td>\n <td> 30500</td>\n <td> METTI PALYA </td>\n <td> Anganwadi </td>\n <td> 1441345</td>\n <td> male </td>\n <td> 2007-08-24 </td>\n <td> tamil </td>\n <td> Anganwadi Assessment </td>\n <td> Pretest </td>\n <td> 1 +</td>\n <td> 0</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td>...</td>\n </tr>\n <tr>\n <th>25919</th>\n <td> bangalore </td>\n <td> bangalore state </td>\n <td> wilson garden </td>\n <td> 30779</td>\n <td> GULBARGA SLUM </td>\n <td> Anganwadi </td>\n <td> 1617500</td>\n <td> female </td>\n <td> 2008-06-25 </td>\n <td> kannada </td>\n <td> Anganwadi Assessment </td>\n <td> Pretest </td>\n <td> 1 +</td>\n <td> 0</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td>...</td>\n </tr>\n </tbody>\n</table>\n<p>2 rows \u00d7 68 columns</p>\n</div>",
"metadata": {},
"output_type": "pyout",
"prompt_number": 33,
"text": " DIST PROJECT \\\n23401 bangalore bangalore south(banashankari) \n25919 bangalore bangalore state \n\n CIRCLE SCODE \\\n23401 thavare kere 30500 \n25919 wilson garden 30779 \n\n SNAME STYPE \\\n23401 METTI PALYA Anganwadi \n25919 GULBARGA SLUM Anganwadi \n\n STUID CSEX DOB CLANG \\\n23401 1441345 male 2007-08-24 tamil \n25919 1617500 female 2008-06-25 kannada \n\n PROGNAME ASSMNTNAME \\\n23401 Anganwadi Assessment Pretest \n25919 Anganwadi Assessment Pretest \n\n 1 2 3 4 5 6 7 8 \n23401 1 + 0 1 1 1 1 1 1 ... \n25919 1 + 0 1 1 1 1 1 1 ... \n\n[2 rows x 68 columns]"
}
],
"prompt_number": 33
},
{
"cell_type": "code",
"collapsed": false,
"input": "pretest[pretest['5'] == ' 1 +']",
"language": "python",
"metadata": {},
"outputs": [
{
"html": "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>DIST</th>\n <th>PROJECT</th>\n <th>CIRCLE</th>\n <th>SCODE</th>\n <th>SNAME</th>\n <th>STYPE</th>\n <th>STUID</th>\n <th>CSEX</th>\n <th>DOB</th>\n <th>CLANG</th>\n <th>PROGNAME</th>\n <th>ASSMNTNAME</th>\n <th>1</th>\n <th>2</th>\n <th>3</th>\n <th>4</th>\n <th>5</th>\n <th>6</th>\n <th>7</th>\n <th>8</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>26070</th>\n <td> bangalore </td>\n <td> bangalore state </td>\n <td> wilson garden </td>\n <td> 31071</td>\n <td> S R NAGAR </td>\n <td> Anganwadi </td>\n <td> 1617543</td>\n <td> female </td>\n <td> 2008-07-01 </td>\n <td> kannada </td>\n <td> Anganwadi Assessment </td>\n <td> Pretest </td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1 +</td>\n <td> 1</td>\n <td> 1</td>\n <td> 1</td>\n <td>...</td>\n </tr>\n </tbody>\n</table>\n<p>1 rows \u00d7 68 columns</p>\n</div>",
"metadata": {},
"output_type": "pyout",
"prompt_number": 34,
"text": " DIST PROJECT \\\n26070 bangalore bangalore state \n\n CIRCLE SCODE \\\n26070 wilson garden 31071 \n\n SNAME STYPE \\\n26070 S R NAGAR Anganwadi \n\n STUID CSEX DOB CLANG \\\n26070 1617543 female 2008-07-01 kannada \n\n PROGNAME ASSMNTNAME 1 2 3 4 \\\n26070 Anganwadi Assessment Pretest 1 1 1 1 \n\n 5 6 7 8 \n26070 1 + 1 1 1 ... \n\n[1 rows x 68 columns]"
}
],
"prompt_number": 34
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment