From 165bdf46d8187503eafe582bebb10a3345ca4fb6 Mon Sep 17 00:00:00 2001 From: richik-ray <45549622+richik-ray@users.noreply.github.com> Date: Sun, 3 Nov 2019 10:52:13 -0500 Subject: [PATCH] Add files via upload --- data/Data Parsing and Merging.ipynb | 1450 +++++++++++++++++++++++++++ 1 file changed, 1450 insertions(+) create mode 100644 data/Data Parsing and Merging.ipynb diff --git a/data/Data Parsing and Merging.ipynb b/data/Data Parsing and Merging.ipynb new file mode 100644 index 0000000..1db9cdc --- /dev/null +++ b/data/Data Parsing and Merging.ipynb @@ -0,0 +1,1450 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import pandas as pd\n", + "import math\n", + "pd.set_option('display.max_columns', None)\n", + "pd.set_option('display.max_colwidth', -1)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ValueCounty, State
00.90Autauga, AL
10.86Baldwin, AL
20.81Barbour, AL
30.84Bibb, AL
40.93Blount, AL
50.70Bullock, AL
60.82Butler, AL
70.92Calhoun, AL
80.86Chambers, AL
90.95Cherokee, AL
100.88Chilton, AL
110.79Choctaw, AL
120.91Clarke, AL
130.90Clay, AL
140.98Cleburne, AL
150.93Coffee, AL
160.92Colbert, AL
170.80Conecuh, AL
180.83Coosa, AL
190.95Covington, AL
200.89Crenshaw, AL
210.91Cullman, AL
220.90Dale, AL
230.86Dallas, AL
240.93DeKalb, AL
250.86Elmore, AL
260.88Escambia, AL
270.90Etowah, AL
280.92Fayette, AL
290.92Franklin, AL
.........
31110.91Washburn, WI
31120.93Washington, WI
31130.94Waukesha, WI
31140.89Waupaca, WI
31150.90Waushara, WI
31160.91Winnebago, WI
31170.92Wood, WI
31180.81Albany, WY
31190.66Big Horn, WY
31200.79Campbell, WY
31210.78Carbon, WY
31220.87Converse, WY
31230.98Crook, WY
31240.69Fremont, WY
31250.85Goshen, WY
31260.87Hot Springs, WY
31270.86Johnson, WY
31280.79Laramie, WY
31290.91Lincoln, WY
31300.79Natrona, WY
31310.51Niobrara, WY
31320.85Park, WY
31330.84Platte, WY
31340.86Sheridan, WY
31350.92Sublette, WY
31360.80Sweetwater, WY
31370.93Teton, WY
31380.85Uinta, WY
31390.86Washakie, WY
31400.90Weston, WY
\n", + "

3141 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " Value County, State\n", + "0 0.90 Autauga, AL \n", + "1 0.86 Baldwin, AL \n", + "2 0.81 Barbour, AL \n", + "3 0.84 Bibb, AL \n", + "4 0.93 Blount, AL \n", + "5 0.70 Bullock, AL \n", + "6 0.82 Butler, AL \n", + "7 0.92 Calhoun, AL \n", + "8 0.86 Chambers, AL \n", + "9 0.95 Cherokee, AL \n", + "10 0.88 Chilton, AL \n", + "11 0.79 Choctaw, AL \n", + "12 0.91 Clarke, AL \n", + "13 0.90 Clay, AL \n", + "14 0.98 Cleburne, AL \n", + "15 0.93 Coffee, AL \n", + "16 0.92 Colbert, AL \n", + "17 0.80 Conecuh, AL \n", + "18 0.83 Coosa, AL \n", + "19 0.95 Covington, AL \n", + "20 0.89 Crenshaw, AL \n", + "21 0.91 Cullman, AL \n", + "22 0.90 Dale, AL \n", + "23 0.86 Dallas, AL \n", + "24 0.93 DeKalb, AL \n", + "25 0.86 Elmore, AL \n", + "26 0.88 Escambia, AL \n", + "27 0.90 Etowah, AL \n", + "28 0.92 Fayette, AL \n", + "29 0.92 Franklin, AL \n", + "... ... ... \n", + "3111 0.91 Washburn, WI \n", + "3112 0.93 Washington, WI \n", + "3113 0.94 Waukesha, WI \n", + "3114 0.89 Waupaca, WI \n", + "3115 0.90 Waushara, WI \n", + "3116 0.91 Winnebago, WI \n", + "3117 0.92 Wood, WI \n", + "3118 0.81 Albany, WY \n", + "3119 0.66 Big Horn, WY \n", + "3120 0.79 Campbell, WY \n", + "3121 0.78 Carbon, WY \n", + "3122 0.87 Converse, WY \n", + "3123 0.98 Crook, WY \n", + "3124 0.69 Fremont, WY \n", + "3125 0.85 Goshen, WY \n", + "3126 0.87 Hot Springs, WY\n", + "3127 0.86 Johnson, WY \n", + "3128 0.79 Laramie, WY \n", + "3129 0.91 Lincoln, WY \n", + "3130 0.79 Natrona, WY \n", + "3131 0.51 Niobrara, WY \n", + "3132 0.85 Park, WY \n", + "3133 0.84 Platte, WY \n", + "3134 0.86 Sheridan, WY \n", + "3135 0.92 Sublette, WY \n", + "3136 0.80 Sweetwater, WY \n", + "3137 0.93 Teton, WY \n", + "3138 0.85 Uinta, WY \n", + "3139 0.86 Washakie, WY \n", + "3140 0.90 Weston, WY \n", + "\n", + "[3141 rows x 2 columns]" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "os.chdir(r\"C:\\Users\\rayri\\Desktop\\Python\\HackDuke\")\n", + "df1 = pd.read_csv(\"Avg Temp Parsing.csv\")\n", + "df2 = pd.read_csv(\"Crime Data Parsing.csv\")\n", + "df3 = pd.read_csv(\"HighGrad Parsing.csv\")\n", + "df4 = pd.read_csv(\"Political Parsed.csv\")\n", + "df5 = pd.read_csv(\"Housing Parsing2.csv\")\n", + "#df1 = df1.sort_values('Facility ID')\n", + "#df2 = df2.sort_values('Facility ID')\n", + "#df1 = df1[~df1['Measure Name'].str.contains('Device Days')]\n", + "#df1 = df1[~df1['Measure Name'].str.contains('Confidence Limit')]\n", + "#df1 = df1[~df1['Measure Name'].str.contains('Number of')]\n", + "#df1 = df1[~df1['Measure Name'].str.contains('Predicted Cases')]\n", + "#df1 = df1[~df1['Measure Name'].str.contains('Observed Cases')]\n", + "#df1 = df1[~df1['Measure Name'].str.contains('Patient Days')]\n", + "df3" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": {}, + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
County, StateValueType
0Autauga, AL0.489969Political
1Baldwin, AL0.571601Political
2Barbour, AL0.055688Political
3Bibb, AL0.551536Political
4Blount, AL0.809090Political
5Bullock, AL-0.507431Political
6Butler, AL0.134563Political
7Calhoun, AL0.409974Political
8Chambers, AL0.148129Political
9Cherokee, AL0.690021Political
10Chilton, AL0.662529Political
11Choctaw, AL0.136725Political
12Clarke, AL0.106745Political
13Clay, AL0.605072Political
14Cleburne, AL0.770514Political
15Coffee, AL0.561179Political
16Colbert, AL0.378647Political
17Conecuh, AL0.051632Political
18Coosa, AL0.304455Political
19Covington, AL0.682560Political
20Crenshaw, AL0.454603Political
21Cullman, AL0.770760Political
22Dale, AL0.501093Political
23Dallas, AL-0.375000Political
24DeKalb, AL0.688570Political
25Elmore, AL0.515056Political
26Escambia, AL0.359043Political
27Etowah, AL0.496128Political
28Fayette, AL0.648563Political
29Franklin, AL0.603738Political
............
3123Washburn, WI0.231745Political
3124Washington, WI0.395805Political
3125Waukesha, WI0.264895Political
3126Waupaca, WI0.297764Political
3127Waushara, WI0.323110Political
3128Winnebago, WI0.073373Political
3129Wood, WI0.192354Political
3130Albany, WY0.041735Political
3131Big Horn, WY0.651307Political
3132Campbell, WY0.794219Political
3133Carbon, WY0.491057Political
3134Converse, WY0.729185Political
3135Crook, WY0.803711Political
3136Fremont, WY0.409270Political
3137Goshen, WY0.602830Political
3138Hot Springs, WY0.595128Political
3139Johnson, WY0.642744Political
3140Laramie, WY0.324001Political
3141Lincoln, WY0.639324Political
3142Natrona, WY0.509026Political
3143Niobrara, WY0.761796Political
3144Park, WY0.568400Political
3145Platte, WY0.600132Political
3146Sheridan, WY0.505789Political
3147Sublette, WY0.629841Political
3148Sweetwater, WY0.520899Political
3149Teton, WY-0.268710Political
3150Uinta, WY0.584652Political
3151Washakie, WY0.623755Political
3152Weston, WY0.775383Political
\n", + "

3153 rows × 3 columns

\n", + "
" + ], + "text/plain": [ + " County, State Value Type\n", + "0 Autauga, AL 0.489969 Political\n", + "1 Baldwin, AL 0.571601 Political\n", + "2 Barbour, AL 0.055688 Political\n", + "3 Bibb, AL 0.551536 Political\n", + "4 Blount, AL 0.809090 Political\n", + "5 Bullock, AL -0.507431 Political\n", + "6 Butler, AL 0.134563 Political\n", + "7 Calhoun, AL 0.409974 Political\n", + "8 Chambers, AL 0.148129 Political\n", + "9 Cherokee, AL 0.690021 Political\n", + "10 Chilton, AL 0.662529 Political\n", + "11 Choctaw, AL 0.136725 Political\n", + "12 Clarke, AL 0.106745 Political\n", + "13 Clay, AL 0.605072 Political\n", + "14 Cleburne, AL 0.770514 Political\n", + "15 Coffee, AL 0.561179 Political\n", + "16 Colbert, AL 0.378647 Political\n", + "17 Conecuh, AL 0.051632 Political\n", + "18 Coosa, AL 0.304455 Political\n", + "19 Covington, AL 0.682560 Political\n", + "20 Crenshaw, AL 0.454603 Political\n", + "21 Cullman, AL 0.770760 Political\n", + "22 Dale, AL 0.501093 Political\n", + "23 Dallas, AL -0.375000 Political\n", + "24 DeKalb, AL 0.688570 Political\n", + "25 Elmore, AL 0.515056 Political\n", + "26 Escambia, AL 0.359043 Political\n", + "27 Etowah, AL 0.496128 Political\n", + "28 Fayette, AL 0.648563 Political\n", + "29 Franklin, AL 0.603738 Political\n", + "... ... ... ...\n", + "3123 Washburn, WI 0.231745 Political\n", + "3124 Washington, WI 0.395805 Political\n", + "3125 Waukesha, WI 0.264895 Political\n", + "3126 Waupaca, WI 0.297764 Political\n", + "3127 Waushara, WI 0.323110 Political\n", + "3128 Winnebago, WI 0.073373 Political\n", + "3129 Wood, WI 0.192354 Political\n", + "3130 Albany, WY 0.041735 Political\n", + "3131 Big Horn, WY 0.651307 Political\n", + "3132 Campbell, WY 0.794219 Political\n", + "3133 Carbon, WY 0.491057 Political\n", + "3134 Converse, WY 0.729185 Political\n", + "3135 Crook, WY 0.803711 Political\n", + "3136 Fremont, WY 0.409270 Political\n", + "3137 Goshen, WY 0.602830 Political\n", + "3138 Hot Springs, WY 0.595128 Political\n", + "3139 Johnson, WY 0.642744 Political\n", + "3140 Laramie, WY 0.324001 Political\n", + "3141 Lincoln, WY 0.639324 Political\n", + "3142 Natrona, WY 0.509026 Political\n", + "3143 Niobrara, WY 0.761796 Political\n", + "3144 Park, WY 0.568400 Political\n", + "3145 Platte, WY 0.600132 Political\n", + "3146 Sheridan, WY 0.505789 Political\n", + "3147 Sublette, WY 0.629841 Political\n", + "3148 Sweetwater, WY 0.520899 Political\n", + "3149 Teton, WY -0.268710 Political\n", + "3150 Uinta, WY 0.584652 Political\n", + "3151 Washakie, WY 0.623755 Political\n", + "3152 Weston, WY 0.775383 Political\n", + "\n", + "[3153 rows x 3 columns]" + ] + }, + "execution_count": 74, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df1[\"Type\"] = \"Temp\"\n", + "df2[\"Type\"] = \"Crime\" \n", + "df3[\"Type\"] = \"GradRate\"\n", + "df4[\"Type\"] = \"Political\"\n", + "df5[\"Type\"] = \"HousPrices\"\n", + "df4" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": {}, + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
County, StateTypeValue
0Autauga, ALTemp66.0
1Baldwin, ALTemp68.7
2Barbour, ALTemp66.8
3Bibb, ALTemp64.4
4Blount, ALTemp63.2
5Bullock, ALTemp66.3
6Butler, ALTemp66.8
7Calhoun, ALTemp63.4
8Chambers, ALTemp63.8
9Cherokee, ALTemp62.7
10Chilton, ALTemp64.4
11Choctaw, ALTemp66.4
12Clarke, ALTemp66.9
13Clay, ALTemp62.9
14Cleburne, ALTemp62.6
15Coffee, ALTemp67.5
16Colbert, ALTemp62.0
17Conecuh, ALTemp67.9
18Coosa, ALTemp64.1
19Covington, ALTemp67.7
20Crenshaw, ALTemp66.4
21Cullman, ALTemp62.7
22Dale, ALTemp67.8
23Dallas, ALTemp66.3
24DeKalb, ALTemp61.1
25Elmore, ALTemp65.8
26Escambia, ALTemp68.3
27Etowah, ALTemp63.2
28Fayette, ALTemp63.6
29Franklin, ALTemp61.8
............
2259Kanawha, WVHousPrices139900.0
2260Pendleton, WVHousPrices133950.0
2261Hancock, WVHousPrices94500.0
2262Hardy, WVHousPrices151950.0
2263Preston, WVHousPrices160500.0
2264Hampshire, WVHousPrices199000.0
2265Nicholas, WVHousPrices135500.0
2266Jefferson, WVHousPrices298500.0
2267Upshur, WVHousPrices159000.0
2268Uinta, WYHousPrices199900.0
2269Sublette, WYHousPrices260000.0
2270Crook, WYHousPrices269900.0
2271Carbon, WYHousPrices175900.0
2272Lincoln, WYHousPrices360000.0
2273Fremont, WYHousPrices225450.0
2274Weston, WYHousPrices182450.0
2275Washakie, WYHousPrices154900.0
2276Goshen, WYHousPrices161750.0
2277Natrona, WYHousPrices216900.0
2278Johnson, WYHousPrices248000.0
2279Sweetwater, WYHousPrices235000.0
2280Park, WYHousPrices350000.0
2281Teton, WYHousPrices1662500.0
2282Converse, WYHousPrices229925.0
2283Albany, WYHousPrices265000.0
2284Campbell, WYHousPrices229000.0
2285Platte, WYHousPrices190000.0
2286Hot Springs, WYHousPrices161250.0
2287Sheridan, WYHousPrices275000.0
2288Laramie, WYHousPrices296450.0
\n", + "

14856 rows × 3 columns

\n", + "
" + ], + "text/plain": [ + " County, State Type Value\n", + "0 Autauga, AL Temp 66.0 \n", + "1 Baldwin, AL Temp 68.7 \n", + "2 Barbour, AL Temp 66.8 \n", + "3 Bibb, AL Temp 64.4 \n", + "4 Blount, AL Temp 63.2 \n", + "5 Bullock, AL Temp 66.3 \n", + "6 Butler, AL Temp 66.8 \n", + "7 Calhoun, AL Temp 63.4 \n", + "8 Chambers, AL Temp 63.8 \n", + "9 Cherokee, AL Temp 62.7 \n", + "10 Chilton, AL Temp 64.4 \n", + "11 Choctaw, AL Temp 66.4 \n", + "12 Clarke, AL Temp 66.9 \n", + "13 Clay, AL Temp 62.9 \n", + "14 Cleburne, AL Temp 62.6 \n", + "15 Coffee, AL Temp 67.5 \n", + "16 Colbert, AL Temp 62.0 \n", + "17 Conecuh, AL Temp 67.9 \n", + "18 Coosa, AL Temp 64.1 \n", + "19 Covington, AL Temp 67.7 \n", + "20 Crenshaw, AL Temp 66.4 \n", + "21 Cullman, AL Temp 62.7 \n", + "22 Dale, AL Temp 67.8 \n", + "23 Dallas, AL Temp 66.3 \n", + "24 DeKalb, AL Temp 61.1 \n", + "25 Elmore, AL Temp 65.8 \n", + "26 Escambia, AL Temp 68.3 \n", + "27 Etowah, AL Temp 63.2 \n", + "28 Fayette, AL Temp 63.6 \n", + "29 Franklin, AL Temp 61.8 \n", + "... ... ... ... \n", + "2259 Kanawha, WV HousPrices 139900.0 \n", + "2260 Pendleton, WV HousPrices 133950.0 \n", + "2261 Hancock, WV HousPrices 94500.0 \n", + "2262 Hardy, WV HousPrices 151950.0 \n", + "2263 Preston, WV HousPrices 160500.0 \n", + "2264 Hampshire, WV HousPrices 199000.0 \n", + "2265 Nicholas, WV HousPrices 135500.0 \n", + "2266 Jefferson, WV HousPrices 298500.0 \n", + "2267 Upshur, WV HousPrices 159000.0 \n", + "2268 Uinta, WY HousPrices 199900.0 \n", + "2269 Sublette, WY HousPrices 260000.0 \n", + "2270 Crook, WY HousPrices 269900.0 \n", + "2271 Carbon, WY HousPrices 175900.0 \n", + "2272 Lincoln, WY HousPrices 360000.0 \n", + "2273 Fremont, WY HousPrices 225450.0 \n", + "2274 Weston, WY HousPrices 182450.0 \n", + "2275 Washakie, WY HousPrices 154900.0 \n", + "2276 Goshen, WY HousPrices 161750.0 \n", + "2277 Natrona, WY HousPrices 216900.0 \n", + "2278 Johnson, WY HousPrices 248000.0 \n", + "2279 Sweetwater, WY HousPrices 235000.0 \n", + "2280 Park, WY HousPrices 350000.0 \n", + "2281 Teton, WY HousPrices 1662500.0\n", + "2282 Converse, WY HousPrices 229925.0 \n", + "2283 Albany, WY HousPrices 265000.0 \n", + "2284 Campbell, WY HousPrices 229000.0 \n", + "2285 Platte, WY HousPrices 190000.0 \n", + "2286 Hot Springs, WY HousPrices 161250.0 \n", + "2287 Sheridan, WY HousPrices 275000.0 \n", + "2288 Laramie, WY HousPrices 296450.0 \n", + "\n", + "[14856 rows x 3 columns]" + ] + }, + "execution_count": 79, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "temp = [df1,df2,df3,df4,df5]\n", + "findata = pd.concat(temp, sort = True)\n", + "findata" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": {}, + "outputs": [], + "source": [ + "findata.to_csv(\"findata.csv\", index = False)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "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.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}