摘要:
1. Two ways to get a column of another column with max/min values: a. most_bars_country = flags["name"][flags["bars"].idxmax()] b. bars_sorted = flags 阅读全文
摘要:
1. The way to calculate the variance of a certain set of data: pts_mean = sum(nba_stats["pts"])/len(nba_stats['pts']) point_variance = 0 for i in nba_ 阅读全文
摘要:
1. The way to get the minimum number in Pandas: lowest_income_county = income["county"][income["median_income"].idxmin()] #[income["median_income"].id 阅读全文
摘要:
1.The way to calculate the slope: the covariance of x and y divided by the variance of x from numpy import cov slope_density = cov(wine_quality["quali 阅读全文
摘要:
1. Get the r value and the p value between the dataset: r_fta_pts,p_value = pearsonr(nba_stats["pts"],nba_stats["fta"]) r_stl_pf,p_value = pearsonr(nb 阅读全文
摘要:
1. Add a value to each element in a list: degrees_zero = [f + 459.67 for f in fahrenheit_degrees] 2. Assign the index of a list into the list: survey_ 阅读全文
摘要:
In command line, psql helps you to manage and connect the database:1 1. Type psql in command line to enter the psql command line tool. 2. In the shell 阅读全文
摘要:
PostgreSQL: 1. Why not sqlite? a. Can not mutitasking. b. Lack of advanced function. c. Security Issues. 2. In postgreSQL, there are two components; s 阅读全文
摘要:
Preparing Data for SQL: Sometimes we would like to stroe data into SQL server. However , the dataset need to be cleaned before it is sent. So here we 阅读全文