python

|

Rank Sort Series DataFrames in Python Pandas Numpy

  In this quick notes, we will have a look at Rank and Sort in Series and DataFrames in Python In [1]: import numpy as np import pandas as pd from pandas import Series, DataFrame   In [3]: #make a series ser1 = Series(range(3), index=[‘C’,’A’,’B’]) ser1   Out[3]: C 0 A 1 B 2 dtype: int32 In [4]:…

|

Pandas DataFrame and Series Alignment Python Notes

This week we have a look at Data Alignment in Python In [1]: import numpy as np import pandas as pd from pandas import Series, DataFrame   In [2]: #create series ser1 = Series([0,1,3], index=[‘A’,’B’,’C’]) ser1   Out[2]: A 0 B 1 C 3 dtype: int64 In [3]: ser2 = Series([3,4,5,6], index=[‘A’,’B’,’C’,’D’]) ser2   Out[3]: A 3 B…

|

Running a Chi-Square Test of Independence – Data Analysis and Intrepretation

Running a Chi-Square Test of Independence For the purpose of running Chi Square Test of Independence on the Gapminder dataset I am working on, as indicated in the assignment instruction, I will have to categorize some of my Gapminder quantitative variables into categorical variables. In this sense, I have added another quantitative variable from the Gapminder…

|

Association Of The Literacy Rate And Life Expectancy & Association Of The Literacy Rate And Income Per Person: The Case of Ghana

Background of the Dataset CSV file Used:   In the GapMinder Codebook the Unique        Identifier = Country Hence in this program, my Unique Identifier = Ghana 1.      There are 3 chosen variables (columns) that are core to my chosen research question which is based on the country Ghana. These are a.       incomeperperson b.      lifeexpectancy…