forked from tdwojak/Python2017
labs04 z1
This commit is contained in:
parent
d747ed73a8
commit
ad880b3674
1
labs06/task00.py
Normal file
1
labs06/task00.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
import pandas as pd
|
@ -1,12 +1,21 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
def wczytaj_dane():
|
def wczytaj_dane():
|
||||||
pass
|
my_data = pd.read_csv('mieszkania.csv',
|
||||||
|
encoding='utf-8',
|
||||||
|
index_col='Id')
|
||||||
|
return my_data
|
||||||
|
#print(my_data)
|
||||||
|
|
||||||
def most_common_room_number(dane):
|
def most_common_room_number(dane):
|
||||||
pass
|
room_num = dane['Rooms']
|
||||||
|
room_num_rank = room_num.value_counts()
|
||||||
|
room_num_list = list(room_num_rank)
|
||||||
|
return type(room_num_rank)
|
||||||
|
#return ( room_num_list[room_num_list.index(max(room_num_list))] )
|
||||||
|
#pass
|
||||||
def cheapest_flats(dane, n):
|
def cheapest_flats(dane, n):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -45,7 +54,7 @@ def main():
|
|||||||
.format(most_common_room_number(dane)))
|
.format(most_common_room_number(dane)))
|
||||||
|
|
||||||
print("{} to najłądniejsza dzielnica w Poznaniu."
|
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: {}"
|
print("Średnia cena mieszkania 3-pokojowego, to: {}"
|
||||||
.format(mean_price(dane, 3)))
|
.format(mean_price(dane, 3)))
|
||||||
|
Loading…
Reference in New Issue
Block a user