From 91a014aa9636e030042b77e6e3d76b83eb722898 Mon Sep 17 00:00:00 2001 From: s327689 Date: Sun, 3 Jun 2018 12:34:25 +0200 Subject: [PATCH] tasks --- labs06/task02.py | 11 ++++++++--- labs06/tasks.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/labs06/task02.py b/labs06/task02.py index 9d96016..8dffbd4 100755 --- a/labs06/task02.py +++ b/labs06/task02.py @@ -2,13 +2,18 @@ # -*- coding: utf-8 -*- def wczytaj_dane(): - pass + import pandas as pd + dane = pd.read_csv("labs06/mieszkania.csv") + dane.head() + def most_common_room_number(dane): - pass + dane['Rooms'].value_counts().idxmax() + + def cheapest_flats(dane, n): - pass + def find_borough(desc): dzielnice = ['Stare Miasto', diff --git a/labs06/tasks.py b/labs06/tasks.py index 5fd2b6e..7725734 100755 --- a/labs06/tasks.py +++ b/labs06/tasks.py @@ -92,4 +92,4 @@ data['diff'] = data['Longitude'] + data['Latitude'] równe NYPD. """ p = data[data['Agency'] == 'NYPD'] -p.City.value_counts() \ No newline at end of file +p.Descriptor.value_counts() \ No newline at end of file