Skip to main content

Posts

Showing posts from May, 2018

Extracting Data in a Database Using Python

Extracting data in a database using python. Using Python to extract data in a MySQL table first we need to pip install pymysql Create table along with connection to the mysql server using python import pymysql connection=pymysql.connect(host='host',port=port,user='user',password='password',db='schema') #creating cursor cursor= connection.cursor() #query for create Table TABLES={} TABLES['employees'] = ( "CREATE TABLE employees (" "PersonID int," "LastName varchar(255)," "FirstName varchar(255)," "Address varchar(255)," "City varchar(255)" ")") for name, ddl in TABLES.items(): cursor.execute(ddl) connection.commit() connection.close() Insert Data into the MySQL Table using Python import pymysql # Data set to insert insert_people=[("8","Perera","L.D","123",...

Basics of Data Science with Python

About Data Science with Python From this module I will post some interesting posts about Data science and how to gather information and process them using Python and for that I will be using below softwares  Python 3.6 Anaconda Jupyter Notebook PyCharm by JetBrains In the posts I will include fundamentals of Python  programming techniques such as lambdas, reading and manipulating csv files, and the numpy library. And In the posts I will be doing a simple Data Challange which is available on Kaggle and I will provide the URL's to the github repo which I will be posting the whole module once it finished. In Future I will be post some articles related to Applied Data Science with Python: Applied Plotting, Charting & Data Representation in Python, Applied Machine Learning in Python, Applied Text Mining in Python, Applied Social Network Analysis in Python