Showing posts with label Library. Show all posts
Showing posts with label Library. Show all posts

Sunday, 4 February 2018

Multiple Plots into One Figure in Python MatplotLib


Lets learn, How to plot multiple charts into one Figure. Embedding a jupyter notebook here with the examples.








Like the below page to get update  
Facebook Page      Facebook Group      Twitter Feed      Google+ Feed      Telegram Group     


Tuesday, 16 January 2018

Python Pickle - to save your efforts


This tutorial is for Python beginners who just started getting dirty in Python :-) Lots of time when we are working on some data set and completed lots of cleaning and pre-processing steps, It's advisable from GURUs to save that intermediary dataset to avoid the re-do all the steps if something unexpected happen with Python, Jupyter notebook or your system for rebooted without your permission, weird though :-/



So, let's learn how to save any dataset or variable with Pickle library -

To Import:


To Save: 


To Read:





Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://datagenx.slack.com/messages/datascience/

Saturday, 14 January 2017

Learning Numpy #2

Thursday, 12 January 2017

Learning Numpy #1


Numpy is a python library used for numerical calculations and this is better performant than pure python. In this notebook, I have shared some basics of Numpy and will share more in next few posts. I hope you find these useful.





Click Here for Next Tutorial ~

Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://datagenx.slack.com/messages/datascience/

Wednesday, 11 January 2017

My Learning Path for Machine Learning


I am a Python Lover guy so my way includes lots of Python points. If you dont know the basics of this wonderful language, start it from HERE else you can follow the links which I am going to share.

Learning ML is not only studying ML algorithms, it includes Basic Algebra, Statistics, Algorithms, Programming and lot more. But no need to afraid as such :-) we need to start from somewhere.....

This is my github repo, you can fork it and follow me with these 2 links --

Fork Fork
Follow - Follow @atulsingh0
I am still updating this list and welcome you to update this as well.



Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://datagenx.slack.com/messages/datascience/

Friday, 6 January 2017

10 minutes with pandas library

Thursday, 5 January 2017

Learning Pandas #5 - read & write data from file

Wednesday, 4 January 2017

Learning Pandas #4 - Hierarchical Indexing

Sunday, 1 January 2017

Learning Pandas #3 - Working on Summary & MissingData

Saturday, 31 December 2016

Learning Pandas - DataFrame #2

Friday, 30 December 2016

Learning Pandas - Series #1

Sunday, 27 November 2016

Getting Started with Graphlab - A Python library for Machine Learning


Before Starting with Graphlab, We have to configure our system with some basic tools such as Python, Jupyter Notebook etc. You can find 'How-To' on this link - http://bit.ly/2gvuG95

What is GraphLab ??
GraphLab Create is a Python library, backed by a C++ engine, for quickly building large-scale, high-performance data products. Some key features of GraphLab Create are:
  • Analyze terabyte scale data at interactive speeds, on your desktop.
  • A Single platform for tabular data, graphs, text, and images.
  • State of the art machine learning algorithms including deep learning, boosted trees, and factorization machines.
  • Run the same code on your laptop or in a distributed system, using a Hadoop Yarn or EC2 cluster.
  • Focus on tasks or machine learning with the flexible API.
  • Visualize data for exploration and production monitoring.
After the installation of Graphlab library we can use it as any python library.

Use Jupyter Notebook for starter, Open a Python notebook in Jupyter Notebook and execute below commands to see graphlab working -

 a. Importing Graphlab - 

=





b. Reading CSV file
This method will parse the input file and convert it into a SFrame variable

==


c. Getting Started with SFrame 

i. View content of SFrame variable sf

==


ii. View Head lines (top lines) 

==



ii. View Tail lines (last lines)
 
==







Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://datagenx.slack.com/messages/datascience/

Wednesday, 20 January 2016

Import your own python library


How to use your own written functions or routines when code in python??


Follow below steps for auto import - 
1. Create a folder where you can put all reusable code/function/routines files
2. Let's say it is "routines"
3. Now suppose, you have written all your functions and save it in a file myfunc.py and saved it in routines folder
4. Add routines folder path to your windows path or linux path
for linux:
Edit your .bash_profile (typically towards the end)to the following line
 
export PYTHON_PATH=$PYTHON_PATH:'/path/to/folder/'   #if you have this variable
export PATH=$PATH:'/path/to/folder/'   #else use  this line

 where you put the correct path in the appropriate location


Follow below steps for manual import -
Use below python code to manually import the module file






http://www.datagenx.net/2018/01/python-pickle-to-save-your-efforts.html


How to use your function in your code:-
1.  import that module into your python script session with a command like
import myfunc

2.  for using a function "my_sqrt" from your library myfunc
x = myfunc.my_sqrt(val)

3.  you can create alias for your library also
import myfunc as mf
x = mf.my_sqrt(val)

If want to import a particular peice from library, use as
from myfunc import my_sqrt
x = my_sqrt(val)

this is tedious if you have to import multiple so use as
from myfunc import *
x = my_sqrt(val)

But, remember if you are import multiple library and they having same function name.
While using, you need to call them as step 2





Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://groups.google.com/forum/#!forum/datagenx