-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathScraping
735 lines (735 loc) · 18.4 KB
/
Scraping
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1 Import libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T20:07:15.182622Z",
"start_time": "2019-10-07T20:07:14.053423Z"
}
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import requests, bs4, urllib.parse,re\n",
"from bs4 import BeautifulSoup\n",
"from geopy.geocoders import Nominatim\n",
"from multiprocessing import Pool"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"# All property listings"
]
},
{
"cell_type": "code",
"execution_count": 209,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"import time\n",
"from selenium import webdriver\n",
"from bs4 import BeautifulSoup as bs\n",
"\n",
"browser = webdriver.Chrome(\"C:\\chromedriver_win32\\chromedriver.exe\")\n",
"\n",
"#GO TO MAGICBRICKS\n",
"browser.get(\"https://www.magicbricks.com/property-for-sale/residential-real-estate?proptype=Multistorey-Apartment,Builder-Floor-Apartment,Penthouse,Studio-Apartment&cityName=Hyderabad\")\n",
"\n",
"#CODE TO SCROLL THROUGH DATA\n",
"lenOfPage = browser.execute_script(\"window.scrollTo(0, document.body.scrollHeight);var lenOfPage=document.body.scrollHeight;return lenOfPage;\")\n",
"match=False\n",
"while(match==False):\n",
" lastCount = lenOfPage\n",
" time.sleep(10)\n",
" lenOfPage = browser.execute_script(\"window.scrollTo(0, document.body.scrollHeight);var lenOfPage=document.body.scrollHeight;return lenOfPage;\")\n",
" if lastCount==lenOfPage:\n",
" match=True\n",
"\n",
"\n",
"source_data = browser.page_source\n",
"\n",
"#WRITE TO TEXT FILE\n",
"text_file = open(\"Output.txt\", \"w\")\n",
"text_file.write(str(source_data.encode(\"utf-8\")))\n",
"text_file.close()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T20:25:08.611630Z",
"start_time": "2019-10-07T20:25:05.068932Z"
}
},
"outputs": [],
"source": [
"#READ FROM TEXT FILE\n",
"text_file = open(\"Output.txt\", \"r\")\n",
"source_data = text_file.read()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T20:27:55.735643Z",
"start_time": "2019-10-07T20:25:31.994395Z"
}
},
"outputs": [],
"source": [
"soup2 = BeautifulSoup(source_data, 'html.parser')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Put data together"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Get lists"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T21:11:10.390531Z",
"start_time": "2019-10-07T21:11:10.371582Z"
}
},
"outputs": [],
"source": [
"#FUNCTION TO GET THE DATA FROM HTML\n",
"def get_data(soup):\n",
"\n",
"#TO GET UNIQUE HOUSE ID\n",
" ids = []\n",
" for x in soup.find_all(\"span\", attrs = {\"data-idtag\" : \"idTag\"}):\n",
" ids.append(x[\"data-idvalue\"])\n",
"\n",
"#TO GET THE LOCATION\n",
" loc = []\n",
" for x in soup.find_all(\"div\", {\"itemprop\": \"address\"}):\n",
" try:\n",
" loc.append(x.find('meta', {\"itemprop\": \"addressLocality\"})['content'])\n",
" except:\n",
" loc.append('location_not_available')\n",
"\n",
"#TO GET THE PRICE\n",
" price = []\n",
" for x in soup.find_all('div', attrs = {\"class\":\"m-srp-card__info flex__item\"}):\n",
" price.append(x.find('span').contents[0])\n",
"\n",
"#CONVERT TO PANDAS DATAFRAME\n",
" d = {'house_id' : ids, 'location' : loc, 'price' : price}\n",
" data = pd.DataFrame(data= d)\n",
" \n",
"#SPLIT THE LOCATION COLUMN AFTER COMMA \n",
" loc_col = data.location.str.split(\",\",expand=True).iloc[:,0]\n",
" loc_col.columns = ['location_only']\n",
" data[\"location_only\"] = loc_col\n",
" \n",
" return data"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T21:11:23.363336Z",
"start_time": "2019-10-07T21:11:15.462801Z"
},
"scrolled": true
},
"outputs": [],
"source": [
"#CALL FUNCTION\n",
"data = get_data(soup2)"
]
},
{
"cell_type": "markdown",
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T14:17:29.717836Z",
"start_time": "2019-10-07T14:17:29.665951Z"
}
},
"source": [
"# Zip codes"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T21:14:07.143119Z",
"start_time": "2019-10-07T21:14:07.133119Z"
}
},
"outputs": [],
"source": [
"# Function to extract zip codes from locality using geopy lilbrary\n",
"\n",
"def zip_extract(local):\n",
" try:\n",
" add = geolocator.geocode(local + \", rangareddy\").address\n",
" zip = int(re.search('5(\\d{5})', add, re.IGNORECASE).group())\n",
" except:\n",
" try:\n",
" add = geolocator.geocode(local + \", hyderabad\").address\n",
" zip = int(re.search('5(\\d{5})', add, re.IGNORECASE).group())\n",
" except:\n",
" try:\n",
" add = geolocator.geocode(local + \", telangana\").address\n",
" zip = int(re.search('5(\\d{5})', add, re.IGNORECASE).group())\n",
" except:\n",
" zip = 0\n",
" print(local)\n",
" return zip\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T21:31:53.900940Z",
"start_time": "2019-10-07T21:17:13.240286Z"
},
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Narsingi\n",
"Gachibowli\n",
"Kondapur\n",
"Madhura Nagar-Nizampet\n",
"Yapral\n",
"Puppalaguda\n",
"Shaikpet\n",
"Banjara Hills\n",
"Suchitra Circle\n",
"Tellapur\n",
"Mokila\n",
"Bachupally\n",
"Adibatla\n",
"Rajendra Nagar\n",
"Bandlaguda Jagir\n",
"Miyapur\n",
"Annojiguda\n",
"Pragathi Nagar\n",
"Kompally\n",
"Nallagandla\n",
"Kokapet\n",
"Manikonda\n",
"Nanakram Guda\n",
"Chandanagar\n",
"Beeramguda\n",
"Financial District\n",
"Pasumamula\n",
"Alkapur Township\n",
"ECIL\n",
"Hitech City\n",
"Manchirevula\n",
"Sanath Nagar\n",
"Kothaguda\n",
"Kukatpally\n",
"Medipally\n",
"Toli Chowki\n",
"Kollur\n",
"Patancheru\n",
"Jagadgiri Gutta\n",
"Isnapur\n",
"Bagh Amberpet\n",
"Aminpur\n",
"Nizampet\n",
"Saidabad\n",
"Ram nagar\n",
"DD Colony\n",
"Old Bowenpally\n",
"Ravi Colony\n",
"Khaja Guda\n",
"Krishna Reddy Pet\n",
"Begumpet\n",
"Attapur\n",
"Ramachandra Puram\n",
"Appa junction\n",
"Erragadda\n",
"Mithila Nagar-Banjara Hills\n",
"Gajularamaram\n",
"Hafeezpet\n",
"Turkayamjal\n",
"Kukatpally Housing Board Colony\n",
"location_not_available\n",
"Kavadiguda\n",
"East Marredpally\n",
"Durga Nagar-Nacharam\n",
"Madhapur\n",
"Kothapet\n",
"Kapra\n",
"Habeeb Nagar\n",
"Green Valley\n",
"Sai Aishwarya Layout-Manikonda\n",
"Lalaguda\n",
"Alwal\n",
"Alakapur\n",
"Bandari Layout\n",
"Raj Bhawan Road\n",
"Ameerpet\n",
"Sainikpuri\n",
"Kailash Hills\n",
"Jayaprakash Narayan Nagar\n",
"Turkapalli\n",
"Jubilee Hills\n",
"KTR Colony\n",
"Bowrampet\n",
"Ashok Nagar\n",
"Somajiguda\n",
"West Marredpally\n",
"Kalyan Nagar-Moti Nagar\n",
"Old Alwal\n",
"Nagaram\n",
"Mayuri Nagar\n",
"Santosh Nagar\n",
"New Santoshnagar\n",
"Bolarum\n",
"Quthbullapur\n",
"APGOs Coop HSG Society\n",
"Vikas Nagar-Bandlaguda Jagir\n",
"Koti\n",
"Chintal\n",
"Gandhi Nagar\n",
"Nagole\n",
"Patighanpur\n",
"Domalguda\n",
"Mansoorabad\n",
"Mallapur\n",
"Sayeedabad\n",
"Hyder Nagar\n",
"Ambedkar Nagar-Hafeezpet\n",
"Old Malakpet\n",
"Silpa Gram Craft Village\n",
"Nacharam\n",
"Dr A.S. Rao Nagar\n",
"Devender Colony\n",
"Income Tax Colony\n",
"ALIND Employees Colony\n",
"Sri Krishna Devaraya Nagar\n",
"Prakash Nagar\n",
"Gachibowli CUC\n",
"Uppal\n",
"KPHB Road\n",
"Bikshapathi Nagar\n",
"Gopalnagar Society\n",
"Sri Ramnagar - Block C\n",
"Vikrampuri\n",
"Whitefields\n",
"K P H B Phase 5\n",
"Prajay City\n",
"Telecom Nagar\n",
"Shamirpet\n",
"Madinaguda\n",
"Shanti Nagar\n",
"Goshamahal\n",
"Shirdi Sai Nagar\n",
"Kavuri Hills\n",
"Masab Tank\n",
"Dammaiguda\n",
"Tarnaka\n",
"Gopanapalli\n",
"Venkatraya Nagar\n",
"Mehdipatnam\n",
"Mallampet\n",
"Rajarajeshwari Nagar\n",
"Gandipet\n",
"Madhava Nagar Colony\n",
"New Nallakunta\n",
"Cherukupally Pratap Reddy Colony\n",
"Noorkhan Bazaar\n",
"Gopal Nagar\n",
"Malakpet\n",
"Secunderabad\n",
"Barkatpura\n",
"Kakatiya Nagar\n",
"Saleem Nagar\n",
"Suraram\n",
"Langar Houz\n",
"Srinagar Colony\n",
"West Venkatapuram\n",
"Boduppal\n",
"Sai Pruthvi Enclave\n",
"Bandam Kommu\n",
"Jawahar Nagar\n",
"Nandagiri Hills\n",
"Peerzadiguda\n",
"Rai Durg\n",
"Rajiv Gandhi Nagar Colony\n",
"Hill Ridge Springs\n",
"Hyder Shah Kote\n",
"Sai Baba Nagar\n",
"Sun City\n",
"IDA Mallapur\n",
"Madhavi Nagar\n",
"Meerpet\n",
"New Malakpet\n",
"Vijaya Nagar Colony\n",
"Balaji Colony\n",
"Hydershakote\n",
"Irram Manzil \n",
"Peeramcheru\n",
"Saraswati Nagar\n",
"Gachibowli Phase 3\n",
"Panchavati Colony\n",
"Anandbagh\n",
"Ghatkesar\n",
"Neknampur\n",
"Mega Hills\n",
"Nalagantla\n",
"Raghavendra Nagar Colony\n",
"Moti Nagar\n",
"Dullapally\n",
"Deepthisri Nagar\n",
"Kakatiya Hills\n",
"Alkapuri\n",
"Camelot Layout\n",
"Chandrayanguttabalguda\n",
"Bandlaguda\n",
"Shapur Nagar\n",
"Adda Gutta\n",
"Saroornagar\n",
"Red Hills\n",
"Musheerabad\n",
"Allwyn Colony\n",
"Maheshwaram\n",
"Devender Nagar\n",
"Neredmet\n",
"Vanasthalipuram\n",
"Sai Nagar-Peerzadiguda\n",
"Shameerpet\n",
"Janachaitanya colony\n",
"Happy Homes Colony\n",
"Shanti Nagar Colony\n",
"Jeedimetla\n",
"Muppas Panchavati Colony\n",
"Injapur\n",
"Masjid Banda\n",
"Shanakar Nagar\n",
"Patancheruvu\n",
"Himayath Nagar\n",
"Moosapet\n",
"Kushaiguda\n",
"Asif Nagar\n",
"Film Nagar\n",
"Kondakal\n",
"Aziz Bagh\n",
"Indresham\n",
"Setwinabad\n",
"Tulasi Nagar\n",
"Mallapur-Balapur\n",
"Boinpalli\n",
"Upparpally\n",
"Raghavendra Colony\n",
"Yakubpura\n",
"Yousufguda\n",
"Anjaneyanagar Colony\n",
"Kalyan Nagar-Erragadda\n",
"Kachiguda\n",
"LB Nagar\n",
"Jaya Puri Colony\n",
"Sanjeeva Reddy Nagar\n",
"Vani Nagar\n",
"Sri Laxmi Nagar Colony-Manikonda\n",
"Rampally\n",
"Pathancheru\n",
"Almasguda\n",
"Vikas Nagar-Dilsukh Nagar\n",
"Pochhama Basti\n",
"Hyderaguda-Attapur\n",
"Osman Nagar\n",
"Dattatreya Colony\n",
"Hari Hara Puram\n",
"Kala Dera\n",
"Amberpet\n",
"Talab Katta\n",
"Sangareddy District\n",
"Vijaya Puri Colony\n",
"Parvathi Nagar-Madhapur\n",
"Arvind Nagar\n",
"Sri Krishna Nagar Colony\n",
"Bahadurpura West\n",
"Lakdikapul\n",
"Bollaram\n",
"Kanchan Bagh\n",
"Osmania University\n",
"Warangal Highway\n",
"Gagilapur\n",
"Brundavan Colony\n",
"Mytri Nagar\n",
"Golden Heights Colony\n",
"Sai Nagar-Bairamalguda\n",
"Jagathgiri Gutta\n",
"Ruby Block\n",
"Chandra Nagar\n",
"Gandhinagar Colony\n",
"Jaihind Nagar Colony\n",
"Huda Colony-Mehdipatnam\n",
"Bongloor\n",
"Surya Nagar Colony\n",
"Murad Nagar\n",
"Sri Krishna Nagar-Quthbullapur\n",
"Borabanda\n",
"Kistareddypet\n",
"Ashok Nagar-Ramachandra Puram\n",
"Jyothi Nagar Colony\n",
"B N Reddy Nagar\n",
"Rama Krishna Puram\n",
"Sri Sai Nagar-Canara Nagar\n",
"Industrial Development Area Bollaram\n",
"Bairamalguda\n",
"Canara Nagar\n",
"Yakutpura\n",
"Chadarghat\n",
"Sri Sai Homes\n",
"Jai Jawahar Nagar\n",
"Sree Prabhupada Township\n",
"Humayun Nagar\n",
"Santosh Nagar-Mehdipatnam\n",
"AWHO Colony\n",
"Tilak Nagar\n",
"Narayanguda\n",
"Nagolu Enclave\n",
"Chirag Ali Lane\n",
"Prashanth Nagar\n",
"Akbarbagh\n",
"Narapally\n",
"Balanagar\n",
"Dilsukh Nagar\n",
"Pocharam\n",
"Hanuman Nagar Colony\n",
"Kismatpur\n",
"Vanasthalipuram PHASE I\n",
"Serilingampally\n",
"Shirdi Enclave-Yapral\n",
"Aditya Nagar\n",
"Charminar\n",
"Jawahar Nagar-Chikkadpally\n",
"Gandi Maisamma\n",
"Navodaya Colony\n",
"Punjagutta\n",
"New Allenby\n",
"Vasanth Nagar Colony\n",
"Medchal\n",
"Habsiguda\n",
"Phase 2\n",
"Jaya Nagar\n",
"Moula Ali\n",
"Gundlapochampally\n",
"Sri Nagar Colony\n",
"Laxmi Nagar-Kondapur\n",
"Vittal Rao Nagar\n",
"Chintalakunta\n",
"Badangpet\n",
"Venkatapuram\n",
"Jubilee Enclave\n",
"RTC Colony\n",
"Matrusri Nagar\n",
"Mudfort\n",
"Balapur\n",
"Maytas Hill County\n",
"Padmarao Nagar\n",
"Chikkadpally\n",
"R K Nagar\n",
"Sindhi Colony\n",
"Safilguda\n",
"Hema Nagar\n",
"Srinivasa Nagar-Padamrao Nagar\n",
"Kalyan Puri\n",
"Mamatha Nagar Colony\n",
"IDPL Colony\n",
"Raghavendra Nagar-Nacharam\n",
"Moti Nagar-Erragadda\n",
"Anupama Homes\n",
"Shankar Nagar\n",
"Gudi Malkapur\n",
"Nagarjuna Nagar\n",
"Mayur Marg\n",
"Khairatabad\n",
"Hyderguda\n",
"Sai Nagar-Quthbullapur\n",
"Nanal nagar\n",
"Hanuman Nagar-Tarnaka\n",
"Samata Colony\n",
"Gowlidoddy\n",
"Sai Nagar-Hafeezpet\n",
"APHB Colony-Moula Ali\n",
"Kalyan Nagar\n",
"Bowenpally\n",
"Saidabad Colony\n",
"Hasmathpet\n",
"Vidyanagar\n",
"Friends Colony\n",
"Panjagutta Colony\n",
"New Maruthi Nagar\n",
"Moosarambagh\n",
"Mythri Nagar\n",
"Gudimalkapur\n",
"Ahmadguda\n",
"Muthangi\n",
"Lumbini Avenue\n",
"Marredpally\n",
"Bahadurpura\n",
"Quli Qutub Shah Layout\n",
"Jalapalli\n",
"Dwaraka Nagar\n",
"Durga Nagar Colony\n",
"Chanakyapuri\n",
"Hyderabad Expressway\n",
"Sangareddy\n",
"Moneykonda\n",
"Shivarampally\n",
"Mohammed Nagar\n",
"NH 9\n",
"Huda\n",
"Mahadevpur Colony\n",
"Chengincherla\n",
"Maruthi Nagar-Langar Houz\n",
"Salar Jung Colony\n",
"Adarsh Nagar Colony-Nagole\n",
"Balaji Hills Colony\n",
"P S Rao Nagar\n",
"Naidu Colony\n",
"Kalasiguda\n",
"Lal Darwaza\n",
"Sai Nagar-Kukatpally\n",
"Shivanagar Colony\n",
"Satyam Enclave\n",
"Officers Colony\n",
"Gayathri Nagar\n",
"Qutub Shahi Tombs\n",
"Karmanghat\n",
"P Janardhan Reddy Nagar\n",
"Dabeerpura\n",
"Konda Nagar\n",
"Hakimpet\n",
"Tukkuguda\n",
"Jamal Colony\n",
"Cherlapally IDA\n",
"Deen Dayal Nagar\n",
"Gowlipura\n",
"Kishan Bagh\n",
"Tanasha Nagar\n",
"Bairagiguda\n",
"Lingampally-Serilingampally\n",
"Shivam Rd\n",
"Gayatri Nagar\n",
"Thimmapuram\n",
"King Koti\n",
"Sai Nagar-Indresham\n",
"Saket\n",
"Sarojini Naidu Nagar\n",
"Gokhale Nagar\n",
"Visakhapatnam\n",
"Yadagirigutta\n",
"Sri Ram Nagar Colony\n",
"Nekanampur\n",
"Bahadurpally\n"
]
}
],
"source": [
"geolocator = Nominatim(user_agent=\"geoapiExercises\")\n",
"\n",
"data_locs = data[['location_only']].drop_duplicates() # Take unique locations\n",
"data_locs['zip_code'] = data_locs['location_only'].apply(lambda x: zip_extract(x)) # Get zip codes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Join zip codes back with data"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {
"ExecuteTime": {
"end_time": "2019-10-07T21:32:34.972559Z",
"start_time": "2019-10-07T21:32:34.946627Z"
}
},
"outputs": [],
"source": [
"data_final = pd.merge(data, data_locs, on = 'location_only')"
]
}
],
"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"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": true
}
},
"nbformat": 4,
"nbformat_minor": 2
}