Save Python Pivot Table in Excel Sheets ExcelWriter

Untitled This is a quick script on how to save Python pivot_table in an excel file. Credit to  pbpython In [1]: import sqlalchemy import pyodbc from pandas import DataFrame import pandas as pd   In [2]: df = DataFrame ## connect to SqlServer Database and get information. try: import urllib params = urllib.quote_plus(“DRIVER={SQL Server Native Client 11.0};SERVER=.\MSSQLSERVER_ENT;DATABASE=Antrak;Trusted_Connection=yes;”)

Read More »

Python Bokeh plotting Data Exploration Visualization And Pivot Tables Analysis

This is a quick walk through Bokeh data exploration and visualization and also python pivot_tables (credit to pbpython on the pivot_tables).Visualization Dashboard In [49]: import sqlalchemy import pyodbc from pandas import DataFrame from bokeh.plotting import figure, output_file, show import pandas as pd   In [50]: df = DataFrame ## connect to SqlServer Database and get information. try: import

Read More »

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

Read More »

Python List Comprehension Dictionary Set Comprehension and For Loops

This is a guide on Python List comprehension. List comprehension is a great way to write simple and easy to read Python codes. You can use it dictionaries and sets as well.   Credits to  Corey Schafer , creator of Python course materials. lets create a list In [115]: num = range(10) num   Out[115]: [0, 1,

Read More »
Python
datapandasadmin

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

Read More »
Data Science
datapandasadmin

Python iloc, loc, ix Data Retrieving Selection Functions

  Pandas iloc, loc, and ix functions are very powerful ways to quickly select data from your dataframe. Today , we take a quick look at these 3 functions. Credits to Data School, you can check him out in Youtube  In [1]: import pandas as pd   In [2]: #lets get this public dataset and play with it

Read More »
Data Science
datapandasadmin

Natural Language Processing Machine Learning Algorithm Model Python – NLP

In this guide, we take a look at Natural Language Processing, NLP in Python. Natural Language is a very extensive topic and very powerful machine learning algorithm you can build. This is very useful in many areas of most industries. Credits to Jose Portilla, creator of Learning Python for Data Analysis and Visualization course   on Udemy  

Read More »