"
],
"text/plain": [
" Last Name First Name ... Market\\nSupplement Total\n",
"0 Bredohl Thomas ... NaN 135,110.00\n",
"1 Brigham R. Mark ... NaN 174,973.00\n",
"2 Britto Sarah ... NaN 137,442.00\n",
"3 Brotheridge Neil ... NaN 164,260.00\n",
"4 Brown Douglas ... NaN 124,952.00\n",
"\n",
"[5 rows x 6 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 7
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "svhMuiv7KorZ",
"colab_type": "text"
},
"source": [
"\n",
"\n",
"---\n",
"\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "6Jo7BGZy5eC4",
"colab_type": "code",
"colab": {}
},
"source": [
"df2 = df2.replace(np.NaN, 0)"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "U3IBf-88Foe0",
"colab_type": "code",
"outputId": "4cdc238e-001f-4a73-b1bc-91ad8282b8dc",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 355
}
},
"source": [
"df2.head(10)"
],
"execution_count": 15,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
Last Name
\n",
"
First Name
\n",
"
Current\n",
"Salary
\n",
"
Administrative/\n",
"Research Stipend
\n",
"
Market\n",
"Supplement
\n",
"
Total
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
Bredohl
\n",
"
Thomas
\n",
"
135,110.00
\n",
"
0
\n",
"
0
\n",
"
135,110.00
\n",
"
\n",
"
\n",
"
1
\n",
"
Brigham
\n",
"
R. Mark
\n",
"
174,973.00
\n",
"
0
\n",
"
0
\n",
"
174,973.00
\n",
"
\n",
"
\n",
"
2
\n",
"
Britto
\n",
"
Sarah
\n",
"
133,292.00
\n",
"
4,150.00
\n",
"
0
\n",
"
137,442.00
\n",
"
\n",
"
\n",
"
3
\n",
"
Brotheridge
\n",
"
Neil
\n",
"
164,260.00
\n",
"
0
\n",
"
0
\n",
"
164,260.00
\n",
"
\n",
"
\n",
"
4
\n",
"
Brown
\n",
"
Douglas
\n",
"
124,952.00
\n",
"
0
\n",
"
0
\n",
"
124,952.00
\n",
"
\n",
"
\n",
"
5
\n",
"
Brown
\n",
"
Janine
\n",
"
96,824.00
\n",
"
0
\n",
"
11,180.00
\n",
"
108,004.00
\n",
"
\n",
"
\n",
"
6
\n",
"
Bruno
\n",
"
Paul
\n",
"
109,851.00
\n",
"
0
\n",
"
0
\n",
"
109,851.00
\n",
"
\n",
"
\n",
"
7
\n",
"
Buehler
\n",
"
Alex
\n",
"
109,761.00
\n",
"
0
\n",
"
0
\n",
"
109,761.00
\n",
"
\n",
"
\n",
"
8
\n",
"
Bundock
\n",
"
Chris
\n",
"
106,571.00
\n",
"
0
\n",
"
0
\n",
"
106,571.00
\n",
"
\n",
"
\n",
"
9
\n",
"
Burlingham
\n",
"
Clay
\n",
"
106,571.00
\n",
"
0
\n",
"
0
\n",
"
106,571.00
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Last Name First Name ... Market\\nSupplement Total\n",
"0 Bredohl Thomas ... 0 135,110.00\n",
"1 Brigham R. Mark ... 0 174,973.00\n",
"2 Britto Sarah ... 0 137,442.00\n",
"3 Brotheridge Neil ... 0 164,260.00\n",
"4 Brown Douglas ... 0 124,952.00\n",
"5 Brown Janine ... 11,180.00 108,004.00\n",
"6 Bruno Paul ... 0 109,851.00\n",
"7 Buehler Alex ... 0 109,761.00\n",
"8 Bundock Chris ... 0 106,571.00\n",
"9 Burlingham Clay ... 0 106,571.00\n",
"\n",
"[10 rows x 6 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 15
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "7q5SXExfKqKt",
"colab_type": "text"
},
"source": [
"\n",
"\n",
"---\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "UvdHv1KzJxqV",
"colab_type": "text"
},
"source": [
"**Thanks to StackOverflow for helping me with the capatilize() - which capitalizes the first letter of the word in whichever format you write, whereas the str.contain() - is used to match the string that we are looking for. So this acts as a search engine, wherein you can search for the name of the prof that you want and you'll get your answer. Make sure that you enter the first name of the professor that you are looking for.**"
]
},
{
"cell_type": "code",
"metadata": {
"id": "HKXB-leQ_Tfl",
"colab_type": "code",
"outputId": "88565a10-fc03-4f30-f8ed-499f53e07f95",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 97
}
},
"source": [
"name = input(\"Enter the first name of the prof that you want to search\")\n",
"name = name.capitalize()\n",
"\n",
"df2[df2['First Name'].str.contains(name)]"
],
"execution_count": 16,
"outputs": [
{
"output_type": "stream",
"text": [
"Enter the first name of the prof that you want to searchCortney\n"
],
"name": "stdout"
},
{
"output_type": "execute_result",
"data": {
"text/html": [
"