Array Processing – Python Numpy – How to work with Arrays in Python

  Hi Guys, Thanks for all your emails. In this note, we will be looking at Array Processing in Python. This is part of lectures on Learning Python for Data Analysis and Visualization by Jose Portilla on Udemy. In [3]: import numpy as np import matplotlib.pyplot as plt %matplotlib inline   In [4]: points = np.arange(-5,5,0.01)   In [5]: dx, dy

Read More »

Aggregation – Pandas Numpy Python Series DataFrame

  In this quick notes, we will go through aggregation in Python. This is part of lectures on Learning Python for Data Analysis and Visualization by Jose Portilla on Udemy. import numpy as np import pandas as pd from pandas import Series, DataFrame   url = “http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/” In [2]: dframe_wine = pd.read_csv(‘winequality-red.csv’, sep=’;’)   In [4]: dframe_wine.head()   Out[4]: fixed

Read More »

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]:

Read More »

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

Read More »
Python
datapandasadmin

Read_csv Is Not Returning A Dataframe Python Pandas

I was working with a CSV file on a project and after reading the CSV into the Program with the pandas.read_csv function the returned data type seemed not be a Dataframe for some reason code was as follows: sample = pd.read_csv(‘sample.csv’) When i tried to run some functions on the supposed ‘returned dataframe object -sample’ I

Read More »
Coursera
datapandasadmin

Coursera Capstone Project – Data Analysis and Interpretation

What is it This week, I started the Data Analysis and Interpretation Capstone by Wesleyan University on Coursera. This is the final of 5 course specialisation. The capstone project is expected to take 4 weeks. With each week tackling and doing a major component of the Project work.   What is the objective The objective of

Read More »

Running a Random Forest – Data Analysis and Intrepretation

Overview My research work deals with Ghana, a country from the Gapminder dataset as has already been discussed from the beginning and progression through this course. The variables in my observation dataset are all quantitative. For the purposes of this assignment, I have binned my quantitative target variable, Life Expectancy (lifeexpectancy) into a 2-level binary categorical target variable. I have named

Read More »

Opening and Reading Text Files by Buffer Size – Python

Today, I went through “Opening and Reading Text Files by Buffer Size” with a friend of mine who wanted to grasp the basic concepts of Python This is a simple but straightforward tutorial into the “Opening and Reading Text Files by Buffer Size We further delved into opening and reading binary files. In our case

Read More »

K-Means Cluster Analysis – Data Analysis and Intrepretation

Overview My research work deals with Ghana, a country from the Gapminder dataset as has already been discussed from the beginning and progression through this course I conducted a k-means cluster analysis to find out the underlying sets of the population of Ghana based on their similarity of responses on 22 variables that represent characteristics

Read More »