forked from tdwojak/Python2017
commited tasks
This commit is contained in:
parent
128c5bbadf
commit
d26963a968
@ -1,10 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import pandas as pd
|
||||
|
||||
def wczytaj_dane():
|
||||
pass
|
||||
rooms_data = pd.read_csv('mieszkania.csv', # ścieżka do pliku
|
||||
sep=',', # separator
|
||||
encoding='utf-8', # kodowanie
|
||||
index_col='Id') # ustawienie indeksu na kolumnę Date
|
||||
return rooms_data
|
||||
|
||||
def most_common_room_number(dane):
|
||||
d=dane
|
||||
print d.columns
|
||||
#mcrn= dane.val
|
||||
#return mcrn
|
||||
pass
|
||||
|
||||
def cheapest_flats(dane, n):
|
||||
@ -39,13 +48,14 @@ def find_best_flats(dane):
|
||||
|
||||
def main():
|
||||
dane = wczytaj_dane()
|
||||
print(dane[:5])
|
||||
#print(dane[:5])
|
||||
|
||||
|
||||
print ("Najpopularniejsza liczba pokoi w mieszkaniu to: {}"
|
||||
.format(most_common_room_number(dane)))
|
||||
|
||||
print("{} to najłądniejsza dzielnica w Poznaniu."
|
||||
.format(find_borough("Grunwald i Jeżyce"))))
|
||||
.format(find_borough("Grunwald i Jeżyce")))
|
||||
|
||||
print("Średnia cena mieszkania 3-pokojowego, to: {}"
|
||||
.format(mean_price(dane, 3)))
|
||||
|
Loading…
Reference in New Issue
Block a user