In [52]:
import pandas as pd
from pandas import DataFrame
import re
import time
import numpy as np

In [32]:
df=pd.read_csv(open('output.csv'),names=['price','address','suburb','type','date','bed','bath','carpark','link','refer'])

In [33]:
df.head()


Out[33]:
price address suburb type date bed bath carpark link refer
0 $305,000 516/2 Akuna Street City apartment Sold on 28 Feb 2017 2 1 1 http://www.realestate.com.au/sold/property-apa... https://www.realestate.com.au/sold/in-2601%3b/...
1 $510,000 166/15 Coranderrk Street City apartment Sold on 17 Feb 2017 2 1 2 http://www.realestate.com.au/sold/property-apa... https://www.realestate.com.au/sold/in-2601%3b/...
2 $1,110,000 1401/19 Marcus Clarke Street City apartment Sold on 15 Feb 2017 2 2 2 http://www.realestate.com.au/sold/property-apa... https://www.realestate.com.au/sold/in-2601%3b/...
3 $425,000 31/45 West Row City apartment Sold on 09 Feb 2017 1 1 1 http://www.realestate.com.au/sold/property-apa... https://www.realestate.com.au/sold/in-2601%3b/...
4 $420,000 33/45 'Mayfair' West Row City unit Sold on 18 Jan 2017 1 1 1 http://www.realestate.com.au/sold/property-uni... https://www.realestate.com.au/sold/in-2601%3b/...

In [34]:
def remove_dumy_price_item(row):
    price=str(row['price'])
    if price.startswith('Contact') or price.startswith('Range'):
        return 'n/a'
    else:
        price=price.replace('b','')
        price=price.replace("'","")
        price=price.replace('$','')
        price=price.replace(',','')
        return price

In [35]:
df['new_price']=df.apply(lambda row:remove_dumy_price_item(row),axis=1)

In [36]:
df_house=df[df['type']=='house']
df_house=df_house[df_house['new_price']!='n/a']

In [38]:
def convert_price_to_number(row):
    price=row['new_price']
    return int(price)

In [39]:
df_house['price_int']=df_house.apply(convert_price_to_number,axis=1)

In [50]:
df_house


Out[50]:
price address suburb type date bed bath carpark link refer new_price price_int sold_date month
22 $1,175,000 71 Newdegate Street Deakin house Sold on 03 Mar 2017 3 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1175000 1175000 (2017, 3, 3, 0, 0, 0, 4, 62, -1) 3
23 $1,700,000 30 Mueller Street Yarralumla house Sold on 18 Feb 2017 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1700000 1700000 (2017, 2, 18, 0, 0, 0, 5, 49, -1) 2
24 $991,000 44 Macgregor Street Deakin house Sold on 18 Feb 2017 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 991000 991000 (2017, 2, 18, 0, 0, 0, 5, 49, -1) 2
25 $1,125,000 24 Norman Street Deakin house Sold on 09 Feb 2017 4 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1125000 1125000 (2017, 2, 9, 0, 0, 0, 3, 40, -1) 2
29 $1,450,000 25 Telopea Park Barton house Sold on 21 Dec 2016 2 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1450000 1450000 (2016, 12, 21, 0, 0, 0, 2, 356, -1) 12
30 $1,075,000 77 Newdegate Street Deakin house Sold on 17 Dec 2016 3 2 3 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1075000 1075000 (2016, 12, 17, 0, 0, 0, 5, 352, -1) 12
31 $1,530,000 6 Hutchins Street Yarralumla house Sold on 13 Dec 2016 3 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1530000 1530000 (2016, 12, 13, 0, 0, 0, 1, 348, -1) 12
32 $1,430,000 18 Musgrave Street Yarralumla house Sold on 13 Dec 2016 3 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1430000 1430000 (2016, 12, 13, 0, 0, 0, 1, 348, -1) 12
33 $1,215,000 26 Fergusson Crescent Deakin house Sold on 19 Nov 2016 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1215000 1215000 (2016, 11, 19, 0, 0, 0, 5, 324, -1) 11
36 $870,000 7 De Chair Street Deakin house Sold on 05 Nov 2016 3 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 870000 870000 (2016, 11, 5, 0, 0, 0, 5, 310, -1) 11
37 $1,082,500 47 Newdegate Street Deakin house Sold on 29 Oct 2016 3 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1082500 1082500 (2016, 10, 29, 0, 0, 0, 5, 303, -1) 10
43 $499,950 77 Whitmore Crescent Watson house Sold on 24 Feb 2017 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-0-5... 499950 499950 (2017, 2, 24, 0, 0, 0, 4, 55, -1) 2
53 $272,000 41/39 Correa Street O'Connor house Sold on 11 Jan 2017 2 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-0-5... 272000 272000 (2017, 1, 11, 0, 0, 0, 2, 11, -1) 1
61 $992,000 10 McLean Place Curtin house Sold on 04 Mar 2017 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 992000 992000 (2017, 3, 4, 0, 0, 0, 5, 63, -1) 3
62 $1,150,000 4 Reynolds Street Curtin house Sold on 25 Feb 2017 5 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 1150000 1150000 (2017, 2, 25, 0, 0, 0, 5, 56, -1) 2
63 $840,000 130 Carruthers Street Curtin house Sold on 24 Feb 2017 4 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 840000 840000 (2017, 2, 24, 0, 0, 0, 4, 55, -1) 2
66 $600,000 181 Kent Street Hughes house Sold on 23 Dec 2016 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 600000 600000 (2016, 12, 23, 0, 0, 0, 4, 358, -1) 12
67 $817,500 8 Caffyn Place Garran house Sold on 17 Dec 2016 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 817500 817500 (2016, 12, 17, 0, 0, 0, 5, 352, -1) 12
68 $1,200,000 18 Rason Place Curtin house Sold on 14 Dec 2016 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 1200000 1200000 (2016, 12, 14, 0, 0, 0, 2, 349, -1) 12
70 $730,000 5 Argyle Place Curtin house Sold on 10 Dec 2016 4 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 730000 730000 (2016, 12, 10, 0, 0, 0, 5, 345, -1) 12
73 $1,075,000 17 Maurice Place Garran house Sold on 05 Nov 2016 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 1075000 1075000 (2016, 11, 5, 0, 0, 0, 5, 310, -1) 11
75 $917,500 11 Douglas Place Curtin house Sold on 29 Oct 2016 3 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 917500 917500 (2016, 10, 29, 0, 0, 0, 5, 303, -1) 10
76 $875,000 5 Brand Street Hughes house Sold on 22 Oct 2016 3 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 875000 875000 (2016, 10, 22, 0, 0, 0, 5, 296, -1) 10
77 $950,000 9 Verran Place Curtin house Sold on 20 Oct 2016 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 950000 950000 (2016, 10, 20, 0, 0, 0, 3, 294, -1) 10
78 $950,000 19 Parker Street Curtin house Sold on 15 Oct 2016 4 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 950000 950000 (2016, 10, 15, 0, 0, 0, 5, 289, -1) 10
79 $885,000 16 Parker Street Curtin house Sold on 15 Oct 2016 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 885000 885000 (2016, 10, 15, 0, 0, 0, 5, 289, -1) 10
86 $395,000 27/9 Howitt Street Kingston house Sold on 20 Feb 2017 2 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2604%3b/... 395000 395000 (2017, 2, 20, 0, 0, 0, 0, 51, -1) 2
89 $950,000 108 Walker Crescent Narrabundah house Sold on 12 Feb 2017 3 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2604%3b/... 950000 950000 (2017, 2, 12, 0, 0, 0, 6, 43, -1) 2
96 $2,225,000 72 Dawes Street Kingston house Sold on 04 Feb 2017 4 3 3 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2604%3b/... 2225000 2225000 (2017, 2, 4, 0, 0, 0, 5, 35, -1) 2
100 $1,185,000 32 Charteris Crescent Chifley house Sold on 06 Mar 2017 4 2 4 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2606%3b/... 1185000 1185000 (2017, 3, 6, 0, 0, 0, 0, 65, -1) 3
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
36748 b'$670,000' 10 Buscombe Street Forde house Sold on 06 Oct 2011 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 670000 670000 (2011, 10, 6, 0, 0, 0, 3, 279, -1) 10
36749 b'$864,000' 14 Careel Street Harrison house Sold on 26 Aug 2011 5 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 864000 864000 (2011, 8, 26, 0, 0, 0, 4, 238, -1) 8
36750 b'$618,000' 27 Nimbera Street Harrison house Sold on 12 Jul 2011 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 618000 618000 (2011, 7, 12, 0, 0, 0, 1, 193, -1) 7
36751 b'$600,000' 4 Howmans Street Harrison house Sold on 29 Jun 2011 4 1 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 600000 600000 (2011, 6, 29, 0, 0, 0, 2, 180, -1) 6
36753 b'$655,000' 360 Anthony Rolfe Avenue Harrison house Sold on 31 May 2011 5 3 3 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 655000 655000 (2011, 5, 31, 0, 0, 0, 1, 151, -1) 5
36754 b'$707,000' 37 Bizant Street Amaroo house Sold on 12 May 2011 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 707000 707000 (2011, 5, 12, 0, 0, 0, 3, 132, -1) 5
36755 b'$630,000' 3 Leveque Street Harrison house Sold on 10 May 2011 4 2 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 630000 630000 (2011, 5, 10, 0, 0, 0, 1, 130, -1) 5
36756 b'$950,000' 29 Adder Street Harrison house Sold on 15 Apr 2011 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 950000 950000 (2011, 4, 15, 0, 0, 0, 4, 105, -1) 4
36757 b'$993,000' 4 Buscombe Street Forde house Sold on 05 Apr 2011 5 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 993000 993000 (2011, 4, 5, 0, 0, 0, 1, 95, -1) 4
36759 b'$685,000' 11 Horneville St Forde house Sold on 08 Mar 2011 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 685000 685000 (2011, 3, 8, 0, 0, 0, 1, 67, -1) 3
36760 b'$610,000' 10 Chiesa Street Forde house Sold on 07 Feb 2011 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 610000 610000 (2011, 2, 7, 0, 0, 0, 0, 38, -1) 2
36761 b'$620,000' 27 Leslie Dwyer Street Forde house Sold on 25 Jan 2011 5 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 620000 620000 (2011, 1, 25, 0, 0, 0, 1, 25, -1) 1
36762 b'$679,950' 25 Kings Canyon Street Harrison house Sold on 18 Oct 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 679950 679950 (2010, 10, 18, 0, 0, 0, 0, 291, -1) 10
36763 b'$605,000' 16 Anchorage Street Harrison house Sold on 18 Oct 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 605000 605000 (2010, 10, 18, 0, 0, 0, 0, 291, -1) 10
36764 b'$638,000' 15 Pildappa Street Harrison house Sold on 13 Oct 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 638000 638000 (2010, 10, 13, 0, 0, 0, 2, 286, -1) 10
36766 b'$668,000' 44 Tarrabool Street Amaroo house Sold on 16 Mar 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 668000 668000 (2010, 3, 16, 0, 0, 0, 1, 75, -1) 3
36767 b'$835,000' 27 Bungle Bungle Crescent Harrison house Sold on 05 Mar 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 835000 835000 (2010, 3, 5, 0, 0, 0, 4, 64, -1) 3
36768 b'$750,000' 11 Miljanovic Street Forde house Sold on 19 Feb 2010 5 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 750000 750000 (2010, 2, 19, 0, 0, 0, 4, 50, -1) 2
36769 b'$672,000' 12 Bizant Street Amaroo house Sold on 11 Feb 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 672000 672000 (2010, 2, 11, 0, 0, 0, 3, 42, -1) 2
36770 b'$635,000' 80 Cultivation Street Harrison house Sold on 10 Feb 2010 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 635000 635000 (2010, 2, 10, 0, 0, 0, 2, 41, -1) 2
36771 b'$650,000' 34 Turtle Rock Street Harrison house Sold on 28 Jan 2010 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 650000 650000 (2010, 1, 28, 0, 0, 0, 3, 28, -1) 1
36772 b'$690,000' 39 Burdekin Ave Amaroo house Sold on 24 Dec 2009 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 690000 690000 (2009, 12, 24, 0, 0, 0, 3, 358, -1) 12
36773 b'$641,000' 20 Windjana Street Harrison house Sold on 14 Sep 2009 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 641000 641000 (2009, 9, 14, 0, 0, 0, 0, 257, -1) 9
36776 b'$699,000' 19 Jessie Street Forde house Sold on 07 Jul 2009 5 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 699000 699000 (2009, 7, 7, 0, 0, 0, 1, 188, -1) 7
36777 b'$640,000' 7 Buscombe Street Forde house Sold on 28 May 2009 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 640000 640000 (2009, 5, 28, 0, 0, 0, 3, 148, -1) 5
36778 b'$820,000' 32 Pinnacles Street Harrison house Sold on 26 May 2009 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 820000 820000 (2009, 5, 26, 0, 0, 0, 1, 146, -1) 5
36781 b'$712,000' 1 Arte Street Amaroo house Sold on 03 Dec 2008 4 3 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 712000 712000 (2008, 12, 3, 0, 0, 0, 2, 338, -1) 12
36782 b'$607,250' 27 Neil Harris Crescent Forde house Sold on 12 Aug 2008 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 607250 607250 (2008, 8, 12, 0, 0, 0, 1, 225, -1) 8
36783 b'$600,000' 32 Parsley Street Harrison house Sold on 17 Jun 2008 4 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 600000 600000 (2008, 6, 17, 0, 0, 0, 1, 169, -1) 6
36785 b'$800,000' 8 Larpent Street Amaroo house Sold on 02 Jul 2007 5 4 3 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/between-600... 800000 800000 (2007, 7, 2, 0, 0, 0, 0, 183, -1) 7

22710 rows × 14 columns


In [43]:
def return_date_from_df(x):
    pattern=re.compile(r'\d+.*')
    r=pattern.search(x['date'])
    if r:
        str_date=r.group()
        t=time.strptime(str_date,'%d %b %Y')
        return t
    else:
        return 'n/a'

In [44]:
df_house['sold_date']=df_house.apply(lambda row:return_date_from_df(row),axis=1)

In [45]:
df_house.head()


Out[45]:
price address suburb type date bed bath carpark link refer new_price price_int sold_date
22 $1,175,000 71 Newdegate Street Deakin house Sold on 03 Mar 2017 3 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1175000 1175000 (2017, 3, 3, 0, 0, 0, 4, 62, -1)
23 $1,700,000 30 Mueller Street Yarralumla house Sold on 18 Feb 2017 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1700000 1700000 (2017, 2, 18, 0, 0, 0, 5, 49, -1)
24 $991,000 44 Macgregor Street Deakin house Sold on 18 Feb 2017 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 991000 991000 (2017, 2, 18, 0, 0, 0, 5, 49, -1)
25 $1,125,000 24 Norman Street Deakin house Sold on 09 Feb 2017 4 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1125000 1125000 (2017, 2, 9, 0, 0, 0, 3, 40, -1)
29 $1,450,000 25 Telopea Park Barton house Sold on 21 Dec 2016 2 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1450000 1450000 (2016, 12, 21, 0, 0, 0, 2, 356, -1)

In [46]:
df_house['month']=df_house.apply(lambda row:row['sold_date'][1],axis=1)

In [47]:
df_house.head()


Out[47]:
price address suburb type date bed bath carpark link refer new_price price_int sold_date month
22 $1,175,000 71 Newdegate Street Deakin house Sold on 03 Mar 2017 3 2 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1175000 1175000 (2017, 3, 3, 0, 0, 0, 4, 62, -1) 3
23 $1,700,000 30 Mueller Street Yarralumla house Sold on 18 Feb 2017 4 3 2 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1700000 1700000 (2017, 2, 18, 0, 0, 0, 5, 49, -1) 2
24 $991,000 44 Macgregor Street Deakin house Sold on 18 Feb 2017 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 991000 991000 (2017, 2, 18, 0, 0, 0, 5, 49, -1) 2
25 $1,125,000 24 Norman Street Deakin house Sold on 09 Feb 2017 4 2 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1125000 1125000 (2017, 2, 9, 0, 0, 0, 3, 40, -1) 2
29 $1,450,000 25 Telopea Park Barton house Sold on 21 Dec 2016 2 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1450000 1450000 (2016, 12, 21, 0, 0, 0, 2, 356, -1) 12

In [48]:
df_house_dec=df_house[df_house['month']==12]

In [49]:
df_house_dec.head()


Out[49]:
price address suburb type date bed bath carpark link refer new_price price_int sold_date month
29 $1,450,000 25 Telopea Park Barton house Sold on 21 Dec 2016 2 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1450000 1450000 (2016, 12, 21, 0, 0, 0, 2, 356, -1) 12
30 $1,075,000 77 Newdegate Street Deakin house Sold on 17 Dec 2016 3 2 3 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1075000 1075000 (2016, 12, 17, 0, 0, 0, 5, 352, -1) 12
31 $1,530,000 6 Hutchins Street Yarralumla house Sold on 13 Dec 2016 3 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1530000 1530000 (2016, 12, 13, 0, 0, 0, 1, 348, -1) 12
32 $1,430,000 18 Musgrave Street Yarralumla house Sold on 13 Dec 2016 3 1 0 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2600%3b/... 1430000 1430000 (2016, 12, 13, 0, 0, 0, 1, 348, -1) 12
66 $600,000 181 Kent Street Hughes house Sold on 23 Dec 2016 3 1 1 http://www.realestate.com.au/sold/property-hou... https://www.realestate.com.au/sold/in-2605%3b/... 600000 600000 (2016, 12, 23, 0, 0, 0, 4, 358, -1) 12

In [51]:
df_house_nov=df_house[df_house['month']==11]
df_house_oct=df_house[df_house['month']==10]
df_house_sep=df_house[df_house['month']==9]
df_house_aug=df_house[df_house['month']==8]
df_house_jul=df_house[df_house['month']==7]
df_house_jun=df_house[df_house['month']==6]
df_house_may=df_house[df_house['month']==5]
df_house_apr=df_house[df_house['month']==4]
df_house_mar=df_house[df_house['month']==3]
df_house_feb=df_house[df_house['month']==2]
df_house_jan=df_house[df_house['month']==1]

In [61]:
dec=df_house_dec['price_int'].mean()

In [64]:
nov=df_house_nov['price_int'].mean()
octb=df_house_oct['price_int'].mean()
sep=df_house_sep['price_int'].mean()
aug=df_house_aug['price_int'].mean()
jul=df_house_jul['price_int'].mean()
jun=df_house_jun['price_int'].mean()
may=df_house_may['price_int'].mean()
apr=df_house_apr['price_int'].mean()
mar=df_house_mar['price_int'].mean()
feb=df_house_feb['price_int'].mean()
jan=df_house_jan['price_int'].mean()

In [66]:
print("Canberra Property mean value on January:%d"%jan)
print("Canberra Property mean value on Feburary:%d"%feb)
print("Canberra Property mean value on March:%d"%mar)
print("Canberra Property mean value on April:%d"%apr)
print("Canberra Property mean value on May:%d"%may)
print("Canberra Property mean value on June:%d"%jun)
print("Canberra Property mean value on July:%d"%jul)
print("Canberra Property mean value on August:%d"%aug)
print("Canberra Property mean value on September:%d"%sep)
print("Canberra Property mean value on Octoaber:%d"%octb)
print("Canberra Property mean value on November:%d"%nov)
print("Canberra Property mean value on December:%d"%dec)


Canberra Property mean value on January:560612
Canberra Property mean value on Feburary:607052
Canberra Property mean value on March:615094
Canberra Property mean value on April:604205
Canberra Property mean value on May:611653
Canberra Property mean value on June:593420
Canberra Property mean value on July:593916
Canberra Property mean value on August:593759
Canberra Property mean value on September:1465410
Canberra Property mean value on Octoaber:614019
Canberra Property mean value on November:644972
Canberra Property mean value on December:607999

In [68]:
df_house_sep.describe()


Out[68]:
price_int
count 1.809000e+03
mean 1.465410e+06
std 3.611798e+07
min 1.000000e+00
25% 4.500000e+05
50% 5.550000e+05
75% 7.000000e+05
max 1.536746e+09

In [ ]: