python

Declare Public Protected and Private Variables in Python – Object Oriented Programming
|

Declare Public Protected and Private Variables in Python – Object Oriented Programming

In Python, the scope ( Public, Protected, Private) characteristic of an attribute or member of the class is indicated by “the naming conventions of the member”. These are the naming conventions Public: This means the member can be accessed outside of the class by other instances. The naming convention denotes that it has no underscores…

Superset Caravel BI Tool Installation and Visualizations on Heroku

Superset Caravel BI Tool Installation and Visualizations on Heroku

Superset (formerly called Caravel ) BI Tool by  http://airbnb.io/superset  is a free Data Visualization tool which you can harness its powers for your visualization analytic needs. If you are finding problems installing on your windows PC or you simply want your own online version you can simply sign up FREE with Heroku (at least choosing…

Free Open Source Data Visualization Tools and Service
|

Free Open Source Data Visualization Tools and Service

There are a couple Free Open Source Data Visualization Tools and Services which you can make use of for your work data exploration and visualization purposes. Below ,  I list a few ones in no order of importance. Caravel:   It is a Python based data exploration and visualization software by Airbnb. It is powerful and…

Python Pandas Pivot Table Index location Percentage calculation on Two columns – XlsxWriter pt2
| |

Python Pandas Pivot Table Index location Percentage calculation on Two columns – XlsxWriter pt2

This is a just a bit of addition to a previous post, by formatting the Excel output further using the Python XlsxWriter package. The additions are : Colour formatting has been added to the Total Cost column The “Total Cost” has been given a money formatting The above uses row : column numeric values instead…

Python Pandas Pivot Table Index location Percentage calculation on Two columns

pivot table for year on year This is a quick example of how to use pivot_table,  to calculate year on year percentage sales . In [162]: import sqlalchemy import pyodbc import numpy as np from pandas import DataFrame from bokeh.plotting import figure, output_file, show import pandas as pd   In [163]: df = DataFrame ## connect to…

Python PyQt Gui Basics Button Window PyQt4 Pt1

This is just some quick scrap notes on the basics of Python GUI building using PyQt. In [1]: import sys from PyQt4 import QtGui, QtCore # to help add buttons #app = QtGui.QApplication(sys.argv) # #window = QtGui.QWidget() # ##set the posstion and size of the window #window.setGeometry(50, 50, 500, 500) # ##lets set the title #window.setWindowTitle(‘Date…

Basic Plotting Using Bokeh Python Pandas Library – Scatter, Line Visualizations

  Bokeh is a powerful framework for data visualization in Python. Here I take a look at straightforward plotting and visualization using this powerful library. Credit to PythonHow. You can check him out on Youtube bokeh.models #It is a low level interface which involves a lot of work bokeh.plotting # It is a middle level interface bokeh.chart #…

Python Pandas Groupby function agg Series GroupbyObject

Python Pandas Groupby function agg Series GroupbyObject

Group By FunctionThis is a quick look at Python groupby function. Very powerful and useful function. We will take a simple look at it here. Credits to Data School , creator of Python course materials. lets import sample dataset In [18]: import pandas as pd   In [19]: drinks = pd.read_csv(‘http://bit.ly/drinksbycountry’)   In [20]: #lets check the head…