Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Last active October 13, 2019 11:42
Show Gist options
  • Save MariaLavrovskaya/7b7d7c200d23c8a3513803c34609e90a to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/7b7d7c200d23c8a3513803c34609e90a to your computer and use it in GitHub Desktop.
airbnb_1
import pandas as pd
from scipy import median
from scipy.stats import mode
data=pd.read_csv('AB_NYC_2019.csv')
data.head()
data.describe().T
#Calculating the median for one of the rows
reviews= data.loc[:,['number_of_reviews']]
reviews.dropna()
median(reviews)
#Calculating the mode for one of the rows
mode(reviews.values.T, axis=None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment