{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"00_core.ipynb","provenance":[],"collapsed_sections":[]},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"}},"cells":[{"cell_type":"code","metadata":{"id":"jSel8vGV8HCd"},"source":["# default_exp utils"],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"ngupCX3m8HCg"},"source":["# module name here\n","\n","> API details."]},{"cell_type":"code","metadata":{"id":"H_6pidgU8HCh"},"source":["#hide\n","from nbdev.showdoc import *"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"zqig4q-j8HCh"},"source":["#export \n","def core_test_fn(txt):\n","  return txt + txt + txt + txt"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":35},"id":"bbvH03PV8aZL","executionInfo":{"status":"ok","timestamp":1626133188935,"user_tz":240,"elapsed":5,"user":{"displayName":"Baltimore Neighborhood Indicators Alliance","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14Gg-q3A7kTIHf7wESw989OAOaJeUYKXGEdoA4M3NTA=s64","userId":"16379023391965073054"}},"outputId":"517776f5-71ec-4269-811b-c890d7c10a95"},"source":["core_test_fn('hi ')"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"application/vnd.google.colaboratory.intrinsic+json":{"type":"string"},"text/plain":["'hi hi hi hi '"]},"metadata":{"tags":[]},"execution_count":8}]},{"cell_type":"code","metadata":{"id":"8BvLqK2NFlxD"},"source":["#export\n","def check_labels(ds):\n","  original = ds.copy()\n","  original.rename(columns={ 'CSA':'CSA2010', 'BaltCity':'InBaltimore'}, inplace=True)\n","  df = original[ original['CSA2010'].notnull() | original['InBaltimore'].notnull()  ]\n","  print( 'Total # Rows: ', original.shape[0] ) # rows, columns\n","  print( '# Before | After')\n","  print( '# Where BCity.isnull/notnull: ', original.InBaltimore.isnull().sum(), '|', original.InBaltimore.notnull().sum() ); \n","  print( '# where CSA2010.isnull/notnull: ', original.CSA2010.isnull().sum(), '|', original.CSA2010.notnull().sum() ); \n","  print( '# Where CSA and/or Baltimore lbl Exists: ', df.shape[0])\n","  df.CSA2010 = df.CSA2010.fillna('Baltimore City')\n","  return df"],"execution_count":null,"outputs":[]}]}